[postgis-users] beginner questions re. SRID

christomec christo at mecola.com
Fri Oct 21 07:34:19 PDT 2005

I didn't bother setting my SRID when creating my tables. I thought I'd
leave it for later, when I better understand this whole projection thing.

Do you mean to say that having all my SRID's as -1 influences my query
performance.  I mainly make use of  the following type of queries.

PreparedStatement cadasteQuery = conn.prepareStatement(
                    "SELECT ((('<path id=\"'::text ||
cadastre.erf_number::text) || '\" d=\"'::text) ||
expand(GeomFromText(?,-1), ?)), 0, 6)) ||
'z\"/>'::text AS path " +
                    "FROM cadastre "+
                    "WHERE the_geom && Expand(GeomFromText(?,-1),?) "+
                    "AND Distance(GeomFromText(?,-1),the_geom) < ?;");

> Hi, Paul and Rick,
> Paul Ramsey wrote:
>>> Is there a more human-readable table that contains the SRIDs and
>>> descriptions?
>> More than spatial_ref_sys? Not really. The SRTEXT isn't completely
>> *un*readable though.
> It may be that the EPSG database (where the spatial_ref_sys is derived
> from) contains some more verbose descriptions, but I doubt that it will
> be of much more use.
>> Yes! Confusing! But part of the standard.  The specification says  that
>> all geometries have an SRID.  It also says that the  geometry_columns
>> table contains a single SRID for each spatial column.
> Note, however, that in PostGIS you can avoid this constraint and create
> geometry columns that contain mixed-srid data, or even geometries
> without any specified SRID (represented as -1). PostGIS will work fine,
> but you're not OpenGIS standard compliant any more, and index usage may
> suffer.
>>> Can it properly compare an object with one SRID with an object with  a
>>> different SRID?
>> No, and most/many functions will error out if you try, because it is
>> not really correct to compare geometries with different SRID (unless
>> they happen to map to the same projection! ha!).
> One can use something like
>         intersection(geoma, transform(geomb, srid(geoma)))
> to compare geometries which (potentially) have different SRIDs.
> It works fine, but may be rather slow depending on your exact data and
> query.
> Markus
> _______________________________________________
> postgis-users mailing list
> postgis-users at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-users
> !DSPAM:4358f904214901269420936!

More information about the postgis-users mailing list