Comments (5)
recognized source of error since overlay was first invented in the 1970s.
nice.
I think i was intending for sliver but got the words jumbled up. I think we can catch the area being 0 as a default and if the user has more of a threshold they can build their own validator
from geowrangler.validation import BaseValidator
class AreaValidator(BaseValidator):
validator_column_name = "area_is_not_almost_zero"
fix_available = False # Telling the validator that there is no available fixes
warning_message = "Found geometries with area almost zero" # warning message
geometry_types = ["Polygon", "MultiPolygon"] # What kind of geometies to validate and fix
def check(self, geometry):
# Checks if the geometry is valid. If False, warn the user
return geometry.area > 0.0000001 # or whatever threshold they have
validated_gdf = AreaValidator().validate(gdf)
from geowrangler.
We actually have a broken polygon for slither in data/broker.geojson
{
"type": "Feature",
"properties": {
"id": "slither"
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
0.0,
0.0
],
[
0.0,
1.0
],
[
0.0,
0.0
]
]
]
}
},
A way to detect this is by getting the polygon area.
Btw the polygon has an area. Is this correct?
In [36]: wkt.loads("POLYGON ((122.95320551089915 11.473736609261481, 122.952381 11.4737421, 122.95320551089915 11.47373660926148, 122.95320551089915 11.473736609261481))").area
Out[36]: 7.323127874328026e-19
from geowrangler.
Oh I computed the area on the projected polygon. Maybe it's a precision thing. The sample broken polygon you mentioned seems good!
from geowrangler.
I just noticed, it it supposed to be slither or sliver? Just learned that sliver is the term for the polygon I made in my example (got it from overlaying two geometries). I wonder if it makes sense to have a minimum threshold for slivers
from geowrangler.
Yep agree!
from geowrangler.
Related Issues (20)
- Allow ookla download to accept a date range request and aggregate stats for all the downloaded stats
- Area zonal stats: using imputed_mean results to nulls even if fillna=True HOT 2
- Markdown rendering bug in raster_zonal_stats
- Geofbarik documentation bug
- Bug in GeometryValidation for gdf with None area_of_use
- generate_ookla_features: imputed_mean produces object type values instead of numerical HOT 4
- Warn users when the boundary given in gridgeneration does not contain entire AOI
- area_zonal_stats computation error HOT 4
- Automate publishing of pypi package
- dhs global index computation: include feature recode
- Link to tutorial.dhs.html is not working HOT 3
- Raster Zonal Stats: Nodata values (-99999) for rasters cause negative sums HOT 3
- Spatial join of polygons with highest intersection
- Grid Tile Clustering HOT 3
- COG Generation HOT 3
- Crop raster window and save to file HOT 3
- Installing conda environment conflicts with the geowrangler repo folder
- Vector to Raster Mask
- Raster to DF
- Raster Sampling
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from geowrangler.