scenProc big area tips (1)

When you are trying to process a big area in scenProc getting all vector data loaded can be hard. Either you will have some big shape files that take long to load or you need to do some pre-processing to slice up the data before. But did you know there is an easier way?

scenProc uses the OGR library to read the vector data. This library does not only support many formats, like shape files or GML, but it can also connect to geographical databases. So if you put all your geo data in such a database scenProc can read from it using the ImportOGR step. And only the data for the bounding coordinates that you specified will be read. Instead of a file name you need to specify a database connection string like this:

PG:"dbname='databasename' host='addr' port='5432' user='x' password='y'"

Of course initially you need to setup the database and put your data in it. The connection string above is for a PostgreSQL database with the PostGIS extension installed. There is an easy installer  to get all this installed quickly. And with ogr2ogr it’s also not so hard to put your data into the database.

So the next time you start a project where you will use scenProc to process a big areas consider setting up a geo database first to make your life a bit easier.

3 thoughts on “scenProc big area tips (1)

  1. Luis Alberto says:

    Hi, Arno. Following this entry, I’m trying to connect scenproc to an ESRI File GDB (with *.gdb extension) as this is one of the multiple supported data types according GDAL specifications, but I cannot find any information on how to achieve this, even in GDAL web pages.

    I included the gdb name with and without double quotes, but scenproc only shows a warning (“file specified not exists”). Also, I don’t know how to specify one feature class inside the gdb.

    Thanks beforehand

    • arno says:

      Hi,

      I’m not sure I worked with that format before. If it’s a file you should be able to point the ImportOGR step to it. If it’s a folder you might want to point to the folder.

      • Luis says:

        Hi, Arno. Thanks for the reply. ESRI File GDBs is a complex format. It’s stored into a standard Windows folder whose name is [whatever_name].gdb. This folder holds a lot of files with strange names which are interpreted as data layers by some desktop applications like ArcGIS, for example. That’s why I was thinking that only ESRI applications could read this format. Now, if GDAL can read this format, I could avoid the step of convert the layer to shapefile, as the File GDB format is at least 5 times faster.

        So, even if I could point to the GDB folder [whichever_name].gdb, I also need to point to a specific layer inside it and I don’t know how to do this or where can I find some information on this.

        Thanks again

        Luis

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.