RE: JSON
Obe, Regina <robe.dnd <at> cityofboston.gov>
2008-08-01 10:56:55 GMT
Sophie,
The 1.3.4 is well not actually released yet, but you can
get it from the svn repository
By following the instructions here
Then checkout the branches/1.3
I was hoping it would be a bit easier - to just download
the postgis-svn.tar.gz (but looking at that - that looks like the 1.4 version
which is kind of unstable at the moment I think).
HINT HINT to someone in dev group: Maybe we should
also output the 1.3 branch as a tar.gz?
After you have compiled etc, it outputs just the geojson
part, so you'll need to glue the strings (forming your attribute) together with
your favorite web language e.g. PHP, python, .NET, Perl,
whatever
and then you could use OpenLayers which has a driver for
GeoJSON format as described
and example here (actually this one you can cut and paste
an individual GeoJSON output geometry to see how it looks - take for example
Paul's example below - get rid of the line breaks and paste
in)
Hope that helps,
Regina
Hi everybody,
i
want to use the asgeojson function.
Do you know where we can find the 1.3.4
version of postgis ?
once you have your data in the "geojson format", how do
you "call" it in the json file ?
Thanks for your
help
Sophie
----- Mail Original -----
De: "Paragon Corporation"
<lr <at> pcorp.us>
À: "PostGIS Users Discussion"
<postgis-users <at> postgis.refractions.net>
Envoyé: Jeudi 31 Juillet 2008
07:16:24 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm /
Vienne
Objet: RE: [postgis-users] JSON
We should update the docs to
have an Availability section for the Geometry
Outputs. Well at the very
least for the ST_AsGeomJson.
It confused me too when I tried to use
that function and realized it was in
an unreleased
version.
-----Original Message-----
From:
postgis-users-bounces <at> postgis.refractions.net
[mailto:postgis-users-bounces <at> postgis.refractions.net]
On Behalf Of Paul
Ramsey
Sent: Wednesday, July 30, 2008 7:29 PM
To:
PostGIS Users Discussion
Subject: Re: [postgis-users] JSON
I think
it's unreleased on the 1.3 branch. I have it here on my development
box.
So 1.3.4 would have it.
# select st_asgeojson(geom) from fe_edges
limit 1;
st_asgeojson
----------------------------------------------------------------------------
----------------------------------------------------
{"type":"MultiLineString","coordinates":[[[-89.734634999999997,31.4920720000
00000],[-89.734955999999997,31.492237999999997]]]}
(1
row)
On Wed, Jul 30, 2008 at 4:16 PM, Jim
<jbucher <at> cnrit.tamu.edu> wrote:
> I just installed 1.3.3 and I don't
see an ST_AsGeoJson or an AsGeoJson
> function.
>
> Paul
Ramsey wrote:
>>
>> Jim,
>>
>> We've got
that contribution already,
>>
>>
>>
http://postgis.refractions.net/documentation/manual-1.3/ch06.html#id2
>>
975494
>>
>> Thanks though!
>>
>>
Paul
>>
>
>
_______________________________________________
> postgis-users mailing
list
> postgis-users <at> postgis.refractions.net
>
http://postgis.refractions.net/mailman/listinfo/postgis-users
>
_______________________________________________
postgis-users
mailing
list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
_______________________________________________
postgis-users
mailing
list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users
The substance of this message, including any attachments, may be confidential, legally privileged and/or exempt from disclosure pursuant to Massachusetts law. It is intended solely for the addressee. If you received this in error, please contact the sender and delete the material from any computer.
Help make the earth a greener place. If at all possible resist printing this email and join us in saving paper.
_______________________________________________
postgis-users mailing list
postgis-users <at> postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users