[postgis-users] ST_Translate

Bob Pawley rjpawley at shaw.ca
Wed Jul 9 08:39:45 PDT 2008


Hi Regina

Following is the query I am using.

The shapefile is also attached if any one wants to try it.

The shape was converted from a DXF file with the default SRID.

Bob
 insert into entity (the_geom, position)
 select
 st_translate (public.process.the_geom,
 st_x (st_centroid(spatial_ref.the_geom)) -
 st_x (st_centroid (public.process.the_geom)),
 st_y (st_centroid(spatial_ref.the_geom))-
 st_y (st_centroid (public.process.the_geom))), ('i')
 from  spatial_ref,  process
 where spatial_ref.position_ = '1' ;





----- Original Message ----- 
From: "Paragon Corporation" <lr at pcorp.us>
To: "'PostGIS Users Discussion'" <postgis-users at postgis.refractions.net>
Sent: Wednesday, July 09, 2008 12:11 AM
Subject: RE: [postgis-users] ST_Translate


> Bob,
>
> Doesn't quite make sense to me why translating before ST_Union would cause
> distortion if you are translating all the same amount.
>
> What is the SRID of the data you are translating and what does your
> translate query and union query look like?
>
> Thanks,
> Regina
>
> -----Original Message-----
> From: postgis-users-bounces at postgis.refractions.net
> [mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Bob
> Pawley
> Sent: Tuesday, July 08, 2008 5:30 PM
> To: PostGIS Users Discussion
> Subject: [postgis-users] ST_Translate
>
> I've imported a shapefile that requires six rows in the table.
>
> When I translate that shape, of six rows, to another location the shape
> becomes distorted.
>
> When I collect the six rows by using ST_Union, then translate the single 
> row
> to the new position, there is no distortion.
>
> Is there a method of using ST_Translate, without also using ST_Union, and
> still avoid the distortion of the shape??
>
> I need the  geometries of the shape separate to be able to identify the
> parts of the shape I need. I seem to lose this informaion when I employ
> ST_Union.
>
> Bob
>
> _______________________________________________
> 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 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ButterFly Valve.shx
Type: application/octet-stream
Size: 148 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080709/7af78d1c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ButterFly Valve.dbf
Type: application/octet-stream
Size: 700 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080709/7af78d1c/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ButterFly Valve.shp
Type: application/shapefile
Size: 644 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20080709/7af78d1c/attachment.bin>


More information about the postgis-users mailing list