Обсуждение: pgsql2shp - Could not create dbf file

Поиск
Список
Период
Сортировка

pgsql2shp - Could not create dbf file

От
"Fay Du"
Дата:
<div class="Section1"><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Hi everyone:</span></font><p class="MsoNormal"><font face="Arial" size="2"><span
style="font-size:10.0pt;
font-family:Arial"><span style="mso-spacerun:yes">     </span>I got an error when I use pgsal2shp.</span></font><p
class="MsoNormal"><fontface="Arial" size="2"><span style="font-size:10.0pt; 
font-family:Arial"><span style="mso-spacerun:yes">     </span>My server is Linux</span></font><p
class="MsoNormal"><fontface="Arial" size="2"><span style="font-size:10.0pt; 
font-family:Arial"><span style="mso-spacerun:yes">     </span>The command I used is: pgsql2shp -f <span
class="SpellE">newroads</span><span class="SpellE">gisdb</span> <span class="SpellE">testarea</span> </span></font><p
class="MsoNormal"><fontface="Arial" size="2"><span style="font-size:10.0pt; 
font-family:Arial"><span style="mso-spacerun:yes">     </span>Where, <span class="SpellE">newroads</span> is my out put
filename, <span class="SpellE">gisdb</span> is database name, and <span class="SpellE">testarea</span> is table
name.</span></font><pclass="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; 
font-family:Arial"><span style="mso-spacerun:yes">     </span>After hit enter button, I got the message:<span
style="mso-spacerun:yes"> </span>Initializing... Could not create dbf file</span></font><p class="MsoNormal"><font
face="Arial"size="2"><span style="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial"><span style="mso-spacerun:yes">     </span>What was wrong? Any help will be
appreciated.</span></font><pclass="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt; 
font-family:Arial"> </span></font><p class="MsoNormal"><font face="Arial" size="2"><span style="font-size:10.0pt;
font-family:Arial">Fay</span></font></div>

Re: pgsql2shp - Could not create dbf file

От
Markus Schaber
Дата:
Hi, Fay,

First, this would be better posted to the PostGIS lists, as pgsql2shp is
a PostGIS utility, and not a PostgreSQL SQL query.

Fay Du wrote:
>      The command I used is: pgsql2shp -f newroads gisdb testarea
> 
>      Where, newroads is my out put file name, gisdb is database name,
> and testarea is table name.
> 
>      After hit enter button, I got the message:  Initializing... Could
> not create dbf file

It seems that there was an error creating the newroads.dbf file - each
shapefile consists of corresponding .shp, .dbf and .shx files.

Do you have permissions on the directory to create those three files?

Markus
-- 
Markus Schaber | Logical Tracking&Tracing International AG
Dipl. Inf.     | Software Development GIS

Fight against software patents in EU! www.ffii.org www.nosoftwarepatents.org