[postgis-users] pgsql2shp multilinestring problem

strk strk at keybit.net
Thu Apr 8 05:46:48 PDT 2004


On Thu, Apr 08, 2004 at 02:09:31PM +0200, Stefan Donath wrote:
> > On Thu, Apr 08, 2004 at 01:01:11PM +0200, Stefan Donath wrote:
> > > hello strk,
> > > 
> > > wrong thing:
> > > SRID=20002;MULTILINESTRING((4568045.49981 5596339.50394337,
> > > 			4568052.50248369 5596351.50497029,
> > > 			4568059.00202063 5596360.99578241,
> > > 			4568067.49760825 5596369.99655259,
> > > 			4568076.99946936 5596376.99715163),
> > > 			   (4568045.49981 5596339.50394337,
> > > 			4568052.50248369 5596351.50497029,
> > > 			4568059.00202063 5596360.99578241,
> > > 			4568067.49760825 5596369.99655259,
> > > 			4568076.99946936 5596376.99715163))
> > > 
> > > right thing:
> > > SRID=20002;MULTILINESTRING((4567730.5032164 5596156.49828373,
> > > 			4567739.99682937 5596147.49751354,
> > > 			4567768.5024127 5596119.4951174))
> > > 
> > > in all wrong-exported features the lines are saved twice in the postgis
> > > geom-column and once in the right cases. so this looks like a problem
> > with my
> > > original data which has been shape-files, too. i didn't try the lastest
> > cvs so
> > > far because this looks like a pretty large effort to do to me. maybe i
> > can
> > > avoid this in case you have a suggestion how to handle the problem.
> > 
> > Are you saying you have wrong geometries in the db ?
> > In this case this is not a bug in pgsql2shp, but it might 
> > be in shp2pgsql if that is the tool you used to import data
> > AND the corresponding shapefiles were correct...
> > 
> > --strk;
> > 
> > > 
> > > with best wishes from dresden, germany.
> > > stefan.
> > > 
> > > -- 
> > > NEU : GMX Internet.FreeDSL
> > > Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/info
> > 
> 
> 
> 
> when i watch the original data, the things looks right. but in the
> particular cases there are two lines in the same place. these are compound features.
> then i use shp2pgsql and get the mentioned multilinestrings in postgis. after
> export it seems like the lines are rendered twice again but with an
> additional line from the last point of the first line to the first point of the second
> line. and these a single features now. if this is a problem of shp2pgsql,
> pgsql2shp, multilinestring or my original data, i don't know...
> stefan.

I've tried this: created a table, loded the geometries you reported
here as right and wrong, dumped the table (with pgsql2shp), run 
shp2pgsql on the resulting shapefile.
shp2pgsql results are the same of originally loaded data.
I'm using CVS loader/dumper on a i386 architecture.

--strk;

> 
> 
> -- 
> NEU : GMX Internet.FreeDSL
> Ab sofort DSL-Tarif ohne Grundgebühr: http://www.gmx.net/info



More information about the postgis-users mailing list