[GDAL-DEV] ogr2ogr -f "ESRI Shapefile" - problem

abhay menon abhay.menon at gmail.com
Fri May 26 14:44:17 EDT 2006


Hello Frank and lists,

what i am trying is to create is a validation program for a
linestring dataset store in Oracle (say TABLE A). i am trying to polygonize
the data and check if these create polygon or not so that i can validate
them (ie linestring geometry records of A) for dangle and duplicate lines.
for this i am also refering to another data (say TABLE B) which also stored
in oracle db, this contains the unique attribute value based on which i am
trying to extract the data from A. for this i wrote a program in c++ to
fetch unique id and create a shapefile of linestring from A for each unique
attribute record in B, using ogr2ogr as a external program to create
shapefile. by process this i get a list of shapefile(s) as a input for
my validation program (ie a separate process and use a batch approach due
bulk processing of shapefiles).

hence this is when i faced the problem will extraction.

 hope i cleared my intention of my problem.

but my real problem now is this process is toooo. slow, first to extract and
then to validate...

hence i trying to write a program using ogr api. to fetch the record from
the database and validating on the fly.
for this I wanted to know does OGRGeometryCollection and
OGRGeometryFactory be used for finding open polygon error(or dangle) and
duplicate lines  thru ogr api for my validation part in my main process
itself, as i am unable to find a method in this by which especially in
OGRGeometryFactory for validating these error will insertion of linestring
geometry. if you could put some light on this problem it would great help
for me.

-- 
Best Regrads

Abhay Menon


On 5/26/06, Frank Warmerdam <warmerdam at pobox.com> wrote:
>
> abhay menon wrote:
> --snipped--
> Abhay,
>
> I'm afraid I am not clear on what you are doing or asking.  Are you
> wanting to split a single table in Oracle into many individual shapefiles
> based size, or some attribute value?  This would normally require a
> distinct ogr2ogr call for each output shapefile produced.
>
> If you wanted to streamline the operation, it would likely be best to look
> at writing a python script.
>
> If you are only producing one shapefile at a time currently, you might
> want
> to use the specific shapefile as the output filename instead of the
> directory
> with many shapefiles.  That should avoid the "too many files open"
> problem.
>
> Best regards,
> --
>
> ---------------------------------------+--------------------------------------
> I set the clouds in motion - turn up   | Frank Warmerdam,
> warmerdam at pobox.com
> light and sound - activate the windows | http://pobox.com/~warmerdam
> and watch the world go round - Rush    | President OSGF, http://osgeo.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20060527/ca34ecec/attachment.html


More information about the Gdal-dev mailing list