Opened 12 years ago
Closed 12 years ago
Last modified 12 years ago
#779 closed defect (fixed)
shp2pgsql -S option seems to fail, and is missing in doc
|Reported by:||nicklas||Owned by:||jadams|
here is a problem to load points from a shapefile with type multipoint http://gis.stackexchange.com/questions/5213/problem-loading-os-opendata-multipoint-shapefile-into-postgis
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 , 12 years ago
comment:2 by , 12 years ago
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 , 12 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 , 12 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 , 12 years ago
Okay your persuasive arguments have changed his mind. I'll put it back into the docs .
comment:6 by , 12 years ago
|Status:||new → closed|
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 , 12 years ago
I have only tried in trunk version, but I have assumed it is the same in 1.5