#3682 closed defect (fixed)
Strange fieldlength in result of pgsql2shp
Reported by: | postgispaul | Owned by: | robe |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 2.3.3 |
Component: | utils/loader-dumper | Version: | 2.0.x |
Keywords: | Cc: |
Description
When I export a query to a shapefile, boolean columns are converted to logical fields with a length of 2.
Don't know if it is allowed by the shape/dbf specs, but arcgis isn't able to open them. Other tools (f.e. qgis) are opening them correctly though
it's this piece in http://svn.osgeo.org/postgis/trunk/loader/pgsql2shp-core.c if (pgfieldtype == 16) {
dbffieldtype = FTLogical; dbffieldsize = 2; dbffielddecs = 0;
}
Any particular reason for setting the length to 2? Svn history didn't show any changes there since the file was added.
Change History (12)
comment:1 by , 8 years ago
comment:2 by , 8 years ago
Milestone: | PostGIS 2.3.2 → PostGIS 2.4.0 |
---|
comment:4 by , 8 years ago
postgispaul,
Can you try this out and see if it fixes your issue. I unfortunately don't have ArcGIS to test with. If it does and pramsey and strk have no issue with backporting, I can backport to 2.3 as well.
If you need windows binaries - you can get them from here in about an hour.
http://winnie.postgis.net/download/windows/pg96/buildbot/
I'm still troubleshooting the 32-bit runs, so the 32-bits are too old to test with. I assume you are runnning 64-bit so probably a non-issue.
comment:5 by , 8 years ago
Ok, I'll try. A small first remark though: In the postgis-pg96-binaries-2.4.0devw64gcc48.zip there are 2 different libexpat-1.dll's
comment:6 by , 8 years ago
Are you referring to the one in the postgisgui folder vs. the one in bin?
The one in postgisgui is packaged with gtk. The one in bin is what I build GDAL against (so that ogrfdw has support for OSM files and other xmlish things).
Speaking of which I've got to update the gtk version.
comment:8 by , 8 years ago
If you look close enough you'll probably find a lot of redundant libraries. So I purposely stuffed all the shp2pgsql-gui (gtk stuff in a subfolder) so it wouldn't screw up the PostgreSQL bin folder. The versions of things are not guaranteed to be compatible between the two folders.
comment:9 by , 8 years ago
There were indeed some duplicates, but the libexpat-1 was the only one with different sise/date.
The solution is indeed confirmed. ArcGis opens the shapes correctly now
comment:10 by , 8 years ago
Milestone: | PostGIS 2.4.0 → PostGIS 2.3.3 |
---|---|
Resolution: | fixed |
Status: | closed → reopened |
I'm reopening this cause strk is okay with backporting as long as I add a regression test.
I'll close after I have backported and added a regression test.
@pramsey, @strk
Any reason we set this to 2? Specs say Logical type should be 1
http://www.dbase.com/KnowledgeBase/int/db7_file_fmt.htm
L Logical 1 byte - initialized to 0x20 (space) otherwise T or F.