[FWTools] ogr2ogr in ASP

Gerry James gerry.james at carteryx.com
Wed Dec 5 18:18:19 EST 2007


I am trying to create an ASP application to load MapInfo TAB files into a
PostGIS database using ogr2ogr.  I have spent a fair bit of time dealing
with permissions issues to get the app running but have run into a brick
wall.  I have a test app created to test the conversion online but the
result is a blank page when run.  There is no error message to help debug
the code.  My ASP code looks something like this:

<%

 

dim wshell, wshell, cmnd

set wshell = CreateObject("WScript.Shell")

 

cmnd = "%COMSPEC% ogr2ogr -f  'PostgreSQL' -a_srs  'EPSG:26909'
PG:'host=localhost user=postgres dbname=Foremore password=mercator'
c:\tmp\All_Outcrop.TAB -nln foremore_outcrop"

oShell=wshell.run(cmnd)

 

response.write "Output = " & oShell

set wshell = nothing

 

%>

 

The output from the oShell variable above is 0 indicating that the command
completed successfully but there is no "foremore_outcrop" table in the
database when it is all done.  I have tested the ogr2ogr command and it
works in the FWTools shell.

 

If anyone has attempted this before could I get some help?

 

Thanks

Gerry

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/fwtools/attachments/20071205/101e573a/attachment.html


More information about the FWTools mailing list