Hi Matthias,
how do change the srid in postgis table ?
(Editing the geometry_column table doesn t change geometries srid....)
Fred
On Tue, Jun 28, 2011 at 11:17 AM, Matthias Lendholt <
[email protected]> wrote:
> Hi all,
>
> I'm trying to intersect a geometry with PostGIS and it ends up in
> org.postgresql.util.. PSQLException: ERROR: Operation on two geometries
> with different SRIDs
>
> LineString TEST_LINE;
> Coordinate a = new Coordinate(27.3, 37.0);
> Coordinate b = new Coordinate(27.3, 37.6);
> LineString TEST_LINE = GEOMETRY_FACTORY.createLineString(new
> Coordinate[] { a, b });
> // .. something in between ...
> Filter filter= CQL.toFilter("INTERSECTS('the_geom', "+
> wktW.write(TEST_LINE) + ")");
> // ...
> featureCollection = featureSource.getFeatures(filter);
>
> I tried it both with shapefile and postgis. Shapefile works. If
> featureSource is based on postgis datastore then I get the exception.
> The srid in table geometry_columns is set to 4326. If I change this
> value to -1 then it works also but I prefer having it set to 4326. I
> tried to manually set the SRID for the LineString (.setSRID(4326)) but
> it doesn't help.
>
> Any ideas?
>
> Many thanks in advance,
>
> Matthias
>
>
> ------------------------------------------------------------------------------
> All of the data generated in your IT infrastructure is seriously valuable.
> Why? It contains a definitive record of application performance, security
> threats, fraudulent activity, and more. Splunk takes this data and makes
> sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-d2d-c2
> _______________________________________________
> Geotools-gt2-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users
>
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Geotools-gt2-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users