This repository has been archived by the owner on Aug 5, 2022. It is now read-only.
Added conversion for custom field names and coordinate systems #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi again. For your consideration...
This allows postgis-preview to work against databases that do not use 'geom' as the field name for the geometry or that do not use lat/lon (4326) for the coordinate system.
A summary of the changes:
The biggest advantage is that end users can query using their native field names and do not need to worry about converting to 4326. For example:
A user can use:
instead of having to type the following:
It's a very minor and subtle difference, but I figured it might be useful for others who are stuck with legacy systems and want to provide this to end users who may find coordinate systems etc confusing.
This was just a quick fix I put up at work today and I'm relatively new to NodeJS so suspect there is probably a better way of doing this!
Thanks.