[postgis-devel] JSON Fn Name

Darafei "Komяpa" Praliaskouski me at komzpa.net
Thu Apr 18 22:57:09 PDT 2019


Hi,

how about this?

select (array_agg(*))::json from ...

adding geometry-> json default cast using ST_AsGeoJSON would make this
possible.

On Thu, Apr 18, 2019 at 11:27 PM Regina Obe <lr at pcorp.us> wrote:

> Oh and if it's a feature collection then it's an Agg.
>
>
>
> > -----Original Message-----
> > From: Regina Obe [mailto:lr at pcorp.us]
> > Sent: Thursday, April 18, 2019 4:25 PM
> > To: 'PostGIS Development Discussion' <postgis-devel at lists.osgeo.org>
> > Subject: RE: [postgis-devel] JSON Fn Name
> >
> > ST_AsGeoJSON but I don't like that either.  It should start with ST_As
> though
> >
> > What exactly is this supposed to return?
> >
> > Shouldn't it be ST_AsFeatureCollection  or you planning to just return a
> > literally row with a geo json column, which is useful but not AS useful
> as a
> > Feature Collection
> >
> > > -----Original Message-----
> > > From: postgis-devel [mailto:postgis-devel-bounces at lists.osgeo.org] On
> > > Behalf Of Paul Ramsey
> > > Sent: Thursday, April 18, 2019 3:06 PM
> > > To: PostGIS Development Discussion <postgis-devel at lists.osgeo.org>
> > > Subject: [postgis-devel] JSON Fn Name
> > >
> > > Quick temperature-of-the-room
> > >
> > > ST_AsGeoJSON(record)
> > >
> > > or
> > >
> > > row_to_geojson(record)
> > >
> > > The latter apes the existing pgsql json pattern row_to_json(). The
> > > former apes our old patterns.
> > > I guess there's always that old open source standby: both.
> > >
> > > Thoughts?
> > >
> > > P
> > > _______________________________________________
> > > postgis-devel mailing list
> > > postgis-devel at lists.osgeo.org
> > > https://lists.osgeo.org/mailman/listinfo/postgis-devel
>
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/postgis-devel



-- 
Darafei Praliaskouski
Support me: http://patreon.com/komzpa
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20190419/0f95e822/attachment-0001.html>


More information about the postgis-devel mailing list