Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#779 closed defect (fixed)

shp2pgsql -S option seems to fail, and is missing in doc

Reported by: nicklas Owned by: jadams
Priority: medium Milestone: PostGIS 1.5.3
Component: postgis Version: 1.5.X
Keywords: history Cc:



here is a problem to load points from a shapefile with type multipoint

I checked the data the user is providing and if loaded with SPIT I find that all geometries gets true for ST_Issimple and none has more than one point.

In spite of that using the -S option still gives Multipoint

First, shouldn't -S option in this case create POINT of all geometries?

Second, what if it would have been one MULTIPOINT geometry in the shape, what to do? I thought there where some option to force all geometries to multi instead. I think SPIT does (and also not sets any constraint)

And -S option seems to be missing in documentation, and in the help in shap2pgsql -w option seems to be missing instead.


Change History (7)

comment:1 by nicklas, 13 years ago

I have only tried in trunk version, but I have assumed it is the same in 1.5


comment:2 by jadams, 13 years ago

Owner: changed from pramsey to jadams

According to Paul, -w is an "old" option that is going away (or he'd like it to go away) so it is for now becoming undocumented. That's why it is missing in some docs.

-S should be documented though, and should (will shortly) work for multipoints.

comment:3 by mcayland, 13 years ago

-1. I'd like to keep the -w option, as it's very useful for quickly dumping WKT out from shapefiles - it's helped me out enormously in the field on several occasions. I'd say document it, but switch it to 1.0+ format.

comment:4 by robe, 13 years ago

I'd like to keep -w too (is that a -1 we are doing a not vote right :) )

In some cases where you have badly mangled geometries, its much easier to fix the output if it's in WKT format or as Mark says, more closely inspect it.

comment:5 by jadams, 13 years ago

Okay your persuasive arguments have changed his mind. I'll put it back into the docs ;-).

comment:6 by jadams, 13 years ago

Resolution: fixed
Status: newclosed

Resolved in trunk in revision 6922. -S now creates POINTS from MULTIPOINT shapefiles.

If you have one POINT in a MULTIPOINT shapefile, that's the bug described in #864.

comment:7 by robe, 13 years ago

Keywords: history added
Note: See TracTickets for help on using tickets.