Sloppy Python FDO Tools
=======================

These are some tools I slapped together basically designed for converting SHP to SDF. You will need the FDO Python SWIG stuff compiled. This stuff is "statically" tied to /usr/local/fdo-3.3.0. Change the location in the scripts for varied locations. You will also probably need to set LD_LIBRARY_PATH to reference the dynamic libraries correctly. 

WARNING: I AM NOT A PYTHON PROGRAMMER. These were originally designed for an internal cron job that converts SHP to SDF and stages them into our unmanaged area. It's much better than shuttling the stuff to a Windows box for processing and/or using Java. These were kind of modeled off older versions of FdoToolbox. Considering I put this together in a few hours not really knowing Python and being an FDO idiot, I should win a prize or something.

To convert SHP to SDF, use the tools this way (kind of... I think):

$ makesdf.py output.sdf
$ dumpschema.py OSGeo.SHP DefaultFileLocation=source.shp Default schema.xml
$ applyschema.py schema.xml OSGeo.SDF File=output.sdf
$ copycontext.py OSGeo.SHP DefaultFileLocation=source.shp OSGeo.SDF File=output.sdf
$ bulkcopy.py OSGeo.SHP DefaultFileLocation=source.shp Default OSGeo.SDF File=output.sdf

PRJ files will probably break it right now. Just delete them.

 -- Rick Branson <rick [dot] branson [at] americanroamer [dot] com>

I guess I can put these under BSD since I'm not an asshole.

OMG LICENSE BELOW!!!!

Copyright (c) 2008, Rick Branson 
All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name of American Roamer nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.


