1

I have a GeoJSON as follows:

"type":"FeatureCollection","totalFeatures":131445,"features":[{"type":"Feature","id":"2009BuildingsCOS.1","geometry":{"type":"MultiPolygon","coordinates":[[[[1308926.9929020153,171186.6402624961],[1308925.12256642,171176.955270945],[1308923.6956225059,171177.2343108883],[1308918.0723277144,171148.12967222783],[1308875.0080097103,171156.45018241392],[1308880.5196885085,171184.97062908477],[1308905.5063113617,171180.14093414505],[1308907.491334925,171190.41011768577],[1308926.9929020153,171186.6402624961]]]]}

Any suggestions about what coordinates I have?

Furthermore, I need to convert the coordinates to WGS (also known asEPSG 4326`). Ideally, I want to find a way to output the coordinates as GeoJSON directly from my GeoServer. The current GeoJSON with the unknown coordinates is here:

http://ec2-54-69-8-151.us-west-2.compute.amazonaws.com:8080/geoserver/WRIA9/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=WRIA9:2009BuildingsCOS&maxFeatures=50&outputFormat=application/json

  • 1
    Quite probably 3857, but also conceivably some UTM zone. It would help if you could tell us where in the world they are supposed to be, unless you don't know. – John Powell Nov 19 '14 at 21:50
  • This is from the WRIA 9 data set, in Washington State, USA. My GeoServer is here, where this data set has the name WRIA9:2009BuildingsCOS – modulitos Nov 19 '14 at 21:53
  • 1
    It was down when I tried, but Ian has already answered, you just add srsName=4326 and GeoServer will deal with the rest. Obviously, you have to tell GeoServer what the SRID is when you set the layer up, but I guess you didn't set it up? – John Powell Nov 19 '14 at 21:55
  • For the record, the coordinates were EPSG:2926, found under the layers tab in GeoServer's admin panel, under the column Native SRS. Also, the units were in feet. I set up the GeoServer on Apache Tomcat, but I did not set up the layers. I assume that SRID sets the value for Native SRS? Thanks for the help. – modulitos Nov 19 '14 at 23:59
3

You can have your WFS server reproject the data by adding the srsName parameter to your URL (i.e. http://ec2-54-69-8-151.us-west-2.compute.amazonaws.com:8080/geoserver/WRIA9/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=WRIA9:2009BuildingsCOS&maxFeatures=50&outputFormat=application/json&srsName=epsg:4326). Then your results will be what you want.

{"type":"FeatureCollection","totalFeatures":131445,"features":[{"type":"Feature","id":"2009BuildingsCOS.1","geometry":{"type":"MultiPolygon","coordinates":[[[[-122.17345722626978,47.461391938631515],[-122.17346410417348,47.46136530206787],[-122.17346989133587,47.46136599881724],[-122.17349057116665,47.461285952403514],[-122.17366521700366,47.46130670355382],[-122.1736449474416,47.46138514335701],[-122.17354361476038,47.46137309773591],[-122.17353631446726,47.46140134109307],[-122.17345722626978,47.461391938631515]]]]},"geometry_name":"the_geom","properties":{"PIN_2009":"1431600020","X":1308898.03,"Y":171171.02,"AREA_2009":1480.86865147,"BASE2005":0,"SHAPE_AREA":1480.86865147,"SHAPE_LEN":169.640704389}},{"type":"Feature","id":"2009BuildingsCOS.2","geometry":{"type":"MultiPolygon","coordinates":[[[[-122.17322302537582,47.46136614306344],[-122.17323071021336,47.46133690687326],[-122.17316810544474,47.4613293339197],[-122.17318915984316,47.46124934631671],[-122.17339162412138,47.46127385320279],[-122.17337036591307,47.461354598528146],[-122.17333949637063,47.46135086103058],[-122.173332003034,47.46137932986606],[-122.17322302537582,47.46136614306344]]]]},"geometry_name":"the_geom","properties":{"PIN_2009":"1431600030","X":1308966.63,"Y":171158.45,"AREA_2009":1806.5779552,"BASE2005":0,"SHAPE_AREA":1806.5779552,"SHAPE_LEN":182.685636305}},

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.