koopjs / winnow

Deprecated
Apache License 2.0
90 stars 18 forks source link

Filter non wgs84 source data #88

Closed rgwozdz closed 6 years ago

rgwozdz commented 6 years ago

This PR enables filtering by geometry on data that is not necessarily in SRS WGS84 (prior to this modification, source data was assumed to be WGS84). I have added a new option named sourceDataSR which informs winnow that source data that is in a non-WGS84 SRS. Using this SRS, the geometry envelop can be projected correctly so that in matches the source data.

Unless the source data SRS is one of handful of SRSs that proj4 stores in its hash, the SRS must be passed along to proj4 as WKT. Thus the PR includes some refactoring on functions that normalize incoming SRSs.

Added tests.