Replies: 2 comments
-
The CRS bounds are not None when they are included in the definition of the CRS (that sounds obvious, but see how you defined the CRS ;). That usually happens only on CRSs coming directly from the EPSG (or ESRI) catalog... and I remember a few cases that were also not defined. Also being so restrictive with the area of use is not nice. For instance UTM zones are tangent. If you have to work in an area crossed by that division between zones, you have to choose one. (the city of Sevilla in Spain is one example). It is not dramatic to use a CRS a bit out of it bounds. Another problem is when a grid file is involved. There are not data out of the area of the grid file. |
Beta Was this translation helpful? Give feedback.
-
For example, building a CRS from proj4 strings.
Like mentioned above, |
Beta Was this translation helpful? Give feedback.
-
Hey all! I'm trying to write code that will check if a given geometry has valid values. The use case is to flag if an incoming vector files for potentially invalid polygons, for example if they have the wrong CRS (or it's a .geojson and we assume it's WGS84 but it's not actually).
The code I wrote is below. However, type checking is upset because
area_of_use
can be None.My question is: in what scenarios would area_of_use be
None
? How should I the case ofarea_of_use
is None (if I need to handle it)?Any other feedback on this code is also greatly appreciated! I pieced together best I could with context from this discussion, but may have gotten some things wrong.
Beta Was this translation helpful? Give feedback.
All reactions