<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Something like this ?<br>
<br>
<b>update mul.lotes set geometry = setsrid(geometry, 29185); </b><br>
<br>
where geometry is the geometry field of my geographic table.<span
class="moz-smiley-s3"><span> ;-) </span></span><br>
<br>
It works for me but I do not know how to recreate the constraint I must
delete.<br>
<br>
Can anyone help me :<br>
<br>
CONSTRAINT enforce_srid_geometry CHECK (srid(geometry) = 29185)<br>
<br>
Regards.<br>
Ezequias<br>
<br>
Mark Cave-Ayland escreveu:
<blockquote cite="mid200607141319.k6EDJ2Q01070@webbased16.localdomain"
type="cite">
<blockquote type="cite">
<pre wrap="">-----Original Message-----
From: <a class="moz-txt-link-abbreviated" href="mailto:postgis-users-bounces@postgis.refractions.net">postgis-users-bounces@postgis.refractions.net</a> [<a class="moz-txt-link-freetext" href="mailto:postgis-users">mailto:postgis-users</a>-
<a class="moz-txt-link-abbreviated" href="mailto:bounces@postgis.refractions.net">bounces@postgis.refractions.net</a>] On Behalf Of Johan V
Sent: 14 July 2006 12:46
To: <a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
Subject: Re: [postgis-users] ERROR: Operation on two GEOMETRIES
withdifferentSRIDs
Hi Mark and others,
Yes the geometry created on the fly is -1, but this same sql statement
(with the on the fly created geometry) does work on another table with
SRID=103300, but not on this one.
I need this specific sql statement because it is a statement that is
issued by a software product that makes a WFS/WMS service (GIS Service
over the internet) of this table.
So do I have to change or check some thing in the table to be able to
use this kind of sql statement:
SELECT the_geom FROM table_x WHERE ((the_geom && 'POLYGON((...))')).
Greetz,
Johan.
</pre>
</blockquote>
<pre wrap=""><!---->
Hi Johan,
Hmmm that makes it a bit more tricky. Unfortunately the SQL being issued is
relying on the implicit cast in PostgreSQL rather than using
GeomFromText()/setSRID() as documented and so its behaviour may change
across PostgreSQL/PostGIS versions - if you do get a chance to update the
SQL in your client software, I would highly recommend it.
As for the symptoms you are seeing, I am slightly baffled - can you post the
output of \d <table> for one of your tables that works and your new one that
doesn't, the exact SELECT queries being executed on each table, and can you
confirm that both tables are in the same database running the same version
of PostGIS?
Kind regards,
Mark.
------------------------
WebBased Ltd
17 Research Way
Plymouth
PL6 8BT
T: +44 (0)1752 797131
F: +44 (0)1752 791023
<a class="moz-txt-link-freetext" href="http://www.webbased.co.uk">http://www.webbased.co.uk</a>
<a class="moz-txt-link-freetext" href="http://www.infomapper.com">http://www.infomapper.com</a>
<a class="moz-txt-link-freetext" href="http://www.swtc.co.uk">http://www.swtc.co.uk</a>
This email and any attachments are confidential to the intended recipient
and may also be privileged. If you are not the intended recipient please
delete it from your system and notify the sender. You should not copy it or
use it for any purpose nor disclose or distribute its contents to any other
person.
_______________________________________________
postgis-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a>
<a class="moz-txt-link-freetext" href="http://postgis.refractions.net/mailman/listinfo/postgis-users">http://postgis.refractions.net/mailman/listinfo/postgis-users</a>
</pre>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Ezequias Rodrigues da Rocha
<a class="moz-txt-link-freetext" href="http://ezequiasrocha.blogspot.com">http://ezequiasrocha.blogspot.com</a>
<a class="moz-txt-link-abbreviated" href="mailto:msn:ezequias@hotmail.com">msn:ezequias@hotmail.com</a>
"the worst of democracies is still better than the best of dictatorship"
</pre>
</body>
</html>