[GeoJSON] A first implementation

Martin Daly Martin.Daly at cadcorp.com
Thu Mar 22 15:20:16 PDT 2007


A first client implementation:
http://wiki.geojson.org/Image:Cadcorp_SIS_GeoJSON_Plugin.png

M 

-----Original Message-----
From: geojson-bounces at lists.geojson.org
[mailto:geojson-bounces at lists.geojson.org] On Behalf Of Chris Holmes
Sent: 20 March 2007 00:29
To: geojson at lists.geojson.org
Subject: [GeoJSON] A first implementation

Ok, I threw together a quick implementation.  It's easy to change the
details, and I probably haven't really captured discussion up to this
point, but I thought it'd be easier to throw something up that clients
could try to his.

http://sigma.openplans.org:8080/geoserver/wfs?request=GetCapabilities
now has 'json' as an output format, so you can request any layer there
with 'outputformat=json'  If anyone has a GeoServer and wants to try it
locally I wrote it as a plug-in, I can email you the jar and you just
drop it in.

The output can probably be summed up by:

{
   "features":[{
      "id":"alaska.1",
       "the_geom":{
         "type":"MultiPolygon",
         "members":[{
            "type":"Polygon",
            "exterior":{
               "type":"LinearRing",
               "coordinates":[-129.83,3.46,...,-95.47,21.51]
            }
         }]
       },
       "AREA":1759683.875,
       "PERIMETER":6689.362,
       "DESCRIPTION":"Alaska"
    }]
}

I left out SRS stuff (or I'm assuming a 4326 default).

Here are a few sample requests.  On the ones I include a maxfeature you
probably want to use it or you'll get 6000 features.  If anyone wants to
hit against more than 6000 features let me know, and I can raise it. 
The road layer has millions of features, if anyone wants to test
seriously.

Point:
http://sigma.openplans.org:8080/geoserver/wfs?request=GetFeature&typenam
e=gnis&maxfeatures=2&outputformat=json

LineString:
http://sigma.openplans.org:8080/geoserver/wfs?request=GetFeature&typenam
e=roads&maxfeatures=2&outputformat=json

MultiPoint:
http://sigma.openplans.org:8080/geoserver/wfs?request=GetFeature&typenam
e=topp:tasmania_cities&outputformat=json

MultiLine:
http://sigma.openplans.org:8080/geoserver/wfs?request=GetFeature&typenam
e=tasmania_roads&outputformat=json

MultiPolygon:
http://sigma.openplans.org:8080/geoserver/wfs?request=GetFeature&typenam
e=poly_landmarks&outputformat=json&maxfeatures=2

Chris

--
Chris Holmes
The Open Planning Project
http://topp.openplans.org



More information about the GeoJSON mailing list