Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#401 closed defect (fixed)

shp2pgsql commandline is somewhat broken

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS 1.5.0
Component: postgis Version: master
Keywords: Cc:


Well so I think.

I used to be able to do this with an earlier build

shp2pgsql -c -s 4269 -g the_geom tl_2009_11_state tiger_data.dc_state > test.sql 

And that would output all the stuff. Gui works great though. Doesn't work anymore - commandline just outputs the help.

However if I pass in no arguments like so

shp2pgsql tl_2009_11_state tiger_data.dc_state > test.sql

It works.

I think its the same for all shape files. All the ones I've tested behave the same. for reference though — been testing these ones

Change History (9)

comment:1 by pramsey, 13 years ago

Keywords: windows added

I assume this is mingw/msys build.

comment:2 by pramsey, 13 years ago

The -c option appears to be the problem. I am getting results using other flags. Still investigating.

comment:3 by pramsey, 13 years ago

Keywords: windows removed

And the problem is platform independent, it's related to -c, -d, -a -p, the mode flags.

comment:4 by pramsey, 13 years ago

Ok, fixed I think at r5185. Please give the various command-line options a workout.

comment:5 by pramsey, 13 years ago

Update all the way to r5186 before testing, please, there's another bug fixed in there.

comment:6 by robe, 13 years ago

Okay I tested with a couple of permutations of switches and seems fine (except can't really test the -W option since I don't have any funny character data).

I have one petty complaint though.

The help screen says

-W defaults to "ASCII" But tracing the default it is now WINDOWS-1252

I have aminor gripe about pgsql2shp but I'll post that in a separate ticket and it can slide if needed.

comment:7 by robe, 13 years ago

Resolution: fixed
Status: newclosed

I think we can consider this done, though I can't get -D to work, but can't get it to work in prior versions going back to 1.3.6 either. Well rather it won't load my -D file so save that for another day if we determine its not our install.

somehting about \N is invalid

comment:8 by mcayland, 13 years ago

I can have a quick look at the -D issue today - can you point me towards an appropriate shapefile? The one mentioned above didn't seem to have any NULLs in it.

comment:9 by robe, 13 years ago

False alarm. Can't replicate the situation again and I noticed the last db I was testing against didn't even have spatial_ref_sys loaded. Switching to another database with same file and -D worked fine.

Note: See TracTickets for help on using tickets.