[postgis-tickets] [PostGIS] #2347: [raster] raster2pgsql doesn't work with windows network paths or quoted paths
PostGIS
trac at osgeo.org
Sun Jun 2 20:49:19 PDT 2013
#2347: [raster] raster2pgsql doesn't work with windows network paths or quoted
paths
---------------------+------------------------------------------------------
Reporter: robe | Owner: dustymugs
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.1.0
Component: raster | Version: 2.0.x
Keywords: windows |
---------------------+------------------------------------------------------
Leo ran into 2 problems using raster2pgsql
He has a batch script that looks something like this
{{{
ECHO ON
SET IMGDIR="K:\Product\*.jpg"
SET PGDATABASE=somedb
SET PGUSER=postgres
SET PGPORT=5432
SET PGHOST=localhost
SET PGPASSWORD=somepassword
SET PATH=%PATH%;C:\Program Files\PostgreSQL\9.2\bin\
raster2pgsql -F %IMGDIR% x2 | psql
}}}
In order for the above to work -- he had to take out the "" and also put
in a K: to get it to the drive
{{{
ECHO ON
SET IMGDIR=K:\Products\*.jpg
SET PGDATABASE=somedb
SET PGUSER=postgres
SET PGPORT=5432
SET PGHOST=localhost
SET PGPASSWORD=somepassword
SET PATH=%PATH%;C:\Program Files\PostgreSQL\9.2\bin\
K:
raster2pgsql -F %IMGDIR% x2 | psql
}}}
What he had originally tried just went in a loop and complained invalid
command
{{{
ECHO ON
SET IMGDIR="\\FServer\Products\*.jpg"
SET PGDATABASE=somedb
SET PGUSER=postgres
SET PGPORT=5432
SET PGHOST=localhost
SET PGPASSWORD=somepassword
SET PATH=%PATH%;C:\Program Files\PostgreSQL\9.2\bin\
raster2pgsql -F %IMGDIR% x2 | psql
}}}
I'm guessing the \\ is tripping it up in some way and maybe making it
think its an in memory object or something.
This is using GDAL 1.10.0, latest PostGIS 2.1.0beta3dev
on 9.2 64-bit on windows 2008.
I'm honestly not sure if there is much we can do about this aside from
putting in Raster FAQ
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2347>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list