POST
|
Thanks so much, Chris! What I ended up doing it was going through the KML intermediary. For the sake of saving someone else time in the future, the components I'm using are: ArcGIS Online - for creating and exporting Feature Layers MyGeoData Converter - for converting to GeoJSON My own simple C++ program to swap longitude and latitude values in the JSON object gmaps.js - as a simplified way to access Google Maps API (you could use their API directly just as well) What you do is create your Feature Layer, and publish it as a hosted feature layer. Then you can export it out of ArcGIS as either a shapefile or GeoJSON. At this point, you go to the converter tool, upload your GeoJSON file, or the entire zip file containing the shapefile information (you can upload multiple files at a time for a batch conversion). From here, choose KML as your target format, and hit Convert. Somehow, this strips out the projection coordinates, and leaves the geographic coordinates. You can then convert your KML output back to GeoJSON or whatever you want. One strange thing I noticed was that my final result looked fine in viewers like geojson.io, but failed to render properly using the drawPolygon() method in gmaps.js. After looking at their documentation, I figured out that my coordinates were opposite those in their example. Not sure if that is specific to gmaps.js or what, but I just wrote a simple C++ program to swap each coordinate set, and the feature layers render as expected. There are probably more efficient ways to go about this but the results were a success. Thanks again to Chris Sergent for your help!
... View more
02-27-2015
07:15 AM
|
2
|
0
|
1139
|
POST
|
Hey all, I am trying to export some feature layers from ArcGIS Online for use with the Google Maps API. The most intuitive way to do this seems to be to use GeoJSON multipolygon or polygon objects. I have been able to export my feature layers in GeoJSON format, but they don't seem to translate into usable coordinates for Google Maps. What I get looks like this: {"type":"FeatureCollection",
"crs":{"type":"name","properties":{"name":"EPSG:3857"}},
"features":[{"type":"Feature","id":1,
"geometry":{
"type":"Polygon",
"coordinates":[
[
[-10516017,4054040],
[-10490946,4054346],
[-10492475,4076666],
[-10397693,4074220],
[-10392189,4074220],
....etc....,
[-10516017,4054040]
]
]},
"properties":{"FID":1,"TITLE":"UAMS Southwest Region","VISIBLE":1,
"DESCRIPTIO":"Counties Served by UAMS Southwest","IMAGE_URL":" ","IMAGE_LINK":" ","DATE":null,"TYPEID":0}}]} This object does not show up when integrating it with the Google Maps API. My assumption is that the coordinates here are not in EPSG:3857. Based on other GeoJSON objects I've seen working with the API, these numbers need to look like standard latitude and longitude coordinates. I know it is possible to make this conversion somehow, given only the data in the GeoJSON file. I know this because I've uploaded sample files to this tool: http://converter.mygeodata.eu/. After upload, the feature layer in placed in just the right spot on an OpenStreetMap, and I am told the following information: Feature type: Polygon Feature count: 1 Data extent: Min X: -10325536 Min Y: 4094705 Max X: -10244207 Max Y: 4165944 WGS-84 extent: Min X: -92.76 Min Y: 34.49 Max X: -92.03 Max Y: 35.02 Coordinate reference system (CRS): Name: WGS 84 / Pseudo-Mercator Code: EPSG:3857 After all that, no matter how I try running it through this tool, all exports retain the Data Extent coordinate system and not the WGS-84 Translations. Does anyone have experience with this or similar situations? Any feedback is greatly appreciated.
... View more
02-26-2015
07:14 AM
|
0
|
2
|
5467
|
Title | Kudos | Posted |
---|---|---|
2 | 02-27-2015 07:15 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|