Local EPSG Projection on the map #61
Unanswered
NormanOrellanaUlloa
asked this question in
Q&A
Replies: 2 comments
-
Thanks for checking out our app. 2 solutions come to mind.
https://gis.stackexchange.com/questions/225535/wfs-and-wms-query-srs-parameter-and-bbox-usage
Al |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi Norman & Al:
Current getFeature request doesn’t seem like it includes an EPGS and
GeoServer returns the request with the original projection. If an EPGS:4326
is passed in the request then GeoServer will return the coordinates in the
passed EPGS.
Ideally a getFeature request should include Open Layers Map projection so
that clients don’t need to transform the response before plotting it to
the map (unless there is a reason to receive it in the original
coordinates). If this is done in the code then it will work with any WFS
data regardless of the data's original projection.
Hope this helps,
Nedim
ORIGINAL:
https://opengis.simcoe.ca/geoserver/wfs?service=wfs&version=2.0.0&request=GetFeature&typeNames=simcoe:Assessment%20Parcel&outputFormat=application/json&cql_filter=INTERSECTS(geom,%20POINT%20(-8886927.085054168%205557537.753947401))
RETURN:
{"type":"FeatureCollection","features":[{"type":"Feature","id":"Assessment
Parcel.fid-4ffefa55_17789fa8fcb_6b34","geometry":{"type":"Polygon","coordinates":[[[-8886965.5578,5558520.4646],[-8886936.3662,5558513.7237],[-8886914.1077,5558477.5242],[-8886735.3411,5558186.7831],[-8886497.8474,5557800.5092],[-8886459.0317,5557737.6009],[-8886743.6002,5557541.785],[-8886817.6048,5557497.146],[-8887124.143,5557312.2338],[-8887181.5304,5557265.7945],[-8887686.0807,5558064.6967],[-8886965.5578,5558520.4646]]]},"geometry_name":"geom","properties":{"Assessment
Roll
Number":"434103000236000","Label":"002-36000","arn":"434103000236000"}}],"totalFeatures":1,"numberMatched":1,"numberReturned":1,"timeStamp":"2021-02-10T13:35:57.577Z","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::3857"}}}
WITH &SRSname=EPSG:4326
https://opengis.simcoe.ca/geoserver/wfs?service=wfs&version=2.0.0&request=GetFeature&typeNames=simcoe:Assessment%20Parcel&outputFormat=application/json&SRSname=EPSG:4326&cql_filter=INTERSECTS(geom,%20POINT%20(-8886927.085054168%205557537.753947401))
RETURN:
{"type":"FeatureCollection","features":[{"type":"Feature","id":"Assessment
Parcel.fid-4ffefa55_17789fa8fcb_6b6d","geometry":{"type":"Polygon","coordinates":[[[-79.8329699,44.59841693],[-79.83270767,44.59837381],[-79.83250772,44.59814227],[-79.83090183,44.59628253],[-79.82876839,44.59381162],[-79.8284197,44.5934092],[-79.83097602,44.59215656],[-79.83164082,44.591871],[-79.8343945,44.59068808],[-79.83491002,44.59039099],[-79.83944247,44.59550158],[-79.8329699,44.59841693]]]},"geometry_name":"geom","properties":{"Assessment
Roll
Number":"434103000236000","Label":"002-36000","arn":"434103000236000"}}],"totalFeatures":1,"numberMatched":1,"numberReturned":1,"timeStamp":"2021-02-10T13:38:49.218Z","crs":{"type":"name","properties":{"name":"urn:ogc:def:crs:EPSG::4326"}}}
On Feb 9, 2021, at 11:48 AM, Al Proulx <[email protected]> wrote:
Thanks for checking out our app. 2 solutions come to mind.
1. You may be able to write your WFS url to include your reprojection.
I'm not an expert but it appears that functionality is there. This solution
might not need a code change, just the right WFS url format. Here's a
couple of posts on it.
https://gis.stackexchange.com/questions/225535/wfs-and-wms-query-srs-parameter-and-bbox-usage
https://gis.stackexchange.com/questions/18662/wfs-getfeature-request-with-different-srs
1. This requires a code change but you can re-project the map coordinate
to your SRS. We already have the Proj4 library in our project so you can
use that. Check out the Coordinates.jsx for a sample on how to implement it.
[image: image]
<https://user-images.githubusercontent.com/6944956/107396853-274a8580-6acc-11eb-8135-6a95439d34df.png>
Al
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#61 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACMR3XXGN5T7RUWEOJLLAZ3S6FRNLANCNFSM4XKLVW7Q>
.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all,
Thanks for sharing this wonderful app, I have a question about using local projections. Would you tell me It's possible to add more EPSG codes like 32717? I notice at the main config.json you set the parcelayer URL with GetFeature request, and it is used on the PropertyReportClick.js but only in the 3857 coordinates from the map, which brings me 0 features at the popup info, because the web feature service from my parcels is EPSG:32717.
One of the solutions is reprojecting my parcels to 3857, but I really want to preserve the local coordinates. Please let me know if it is possible another solution.
Regards.
Beta Was this translation helpful? Give feedback.
All reactions