slu-openGIS / gateway

R package for working with spatial data from St. Louis
https://slu-opengis.github.io/gateway/
GNU General Public License v3.0
8 stars 4 forks source link

output to non-NAD83 MO ST PLANE EAST #14

Open walker opened 4 years ago

walker commented 4 years ago

I think what is happening when calling st_transform is that you're reprojecting coordinates returned by the ArcServer.

https://github.com/slu-openGIS/gateway/blob/master/R/geocode_api.R#L194 https://github.com/slu-openGIS/gateway/blob/master/R/geocode_api.R#L93

I would suggest that you just ask the arcserver for the EPSG projection to be returned, in the request, rather than relying on the default.

chris-prener commented 4 years ago

arc server will return that as part of the object @walker ?

walker commented 4 years ago

@chris-prener: Here's an example on the v4 composite geocoder where I've set outSR to 4326, EPSG's wgs84 code.

https://stlgis3.stlouis-mo.gov/arcgis/rest/services/GEOCODE/COMPOSITEGEOCODE_v4/GeocodeServer/findAddressCandidates?SingleLine=1200+Market&outSR=4326&f=json

The "outSR" parameter details here-ish has some helpful links: https://developers.arcgis.com/rest/services-reference/find-address-candidates.htm#GUID-76762A8B-B1C1-4038-88C3-9449E2BCE736

chris-prener commented 4 years ago

This is helpful - the wkid is nice.