Closed rclark closed 9 years ago
As written right now, this PR drops the feature out. Is this the right behavior?
Yes, I dare say so. If the feature is out of the +/-85.xxx bounds it cannot reasonably be displayed with Web Mercator anyway. If anybody wants to display data close to or on the poles they have to look for other solutions.
A bunch of changes:
geometry.transformTo(SRS)
cannot perform transformations between reference systems based on different datum -- for example this function can't transform data in a state-plane SRS using NAD83 to spehrical mercator which uses WGS84. So the PR switches to usinggeometry.transform(gdal.CoordinateTransformation)
which supports datum transformations.intersection
logic that was there before.Question: Cropping presents a scenario where a feature might fall entirely outside the bounds of the target SRS. In this case, we have to decide if we should drop the feature out of the output shapefile, or if we should keep the feature, but set its geometry to null. As written right now, this PR drops the feature out. Is this the right behavior?
cc @GretaCB @BergWerkGIS