Thank you Frank (I was hoping for your reply, seems like you are always
the person to ask things like this :))
I need to create my dataset (fast vectorization), and I am ready to
chose whatever format is best to do this as fast as possible. I need a
topology top test with my functional programming environment, but
because I am NOT a full strength programmer, compiling c++ stuff and so
one sounds more like a nightmare to me :)
A bit of scripting or SQL is ok :). So, you reckon that ArcINFO binary
vectors would be best? ok, I will give it a try! Oh, I thing we should
have such an extraction function in OGR by default!! (at least for the
poor scientists trying to tune up algorithms :)
Thanks
Martin
----------------------------------------------
Ing. Martin Tomko
PhD. candidate
CRC for Spatial Information
Department of Geomatics
University of Melbourne
Victoria 3010
Australia
phone +61 3 8344 9179
fax +61 3 9349 5185
email [EMAIL PROTECTED]
url http://www.geom.unimelb.edu.au/tomko
url http://www.spatialinformationscience.org
url http://www.crcsi.com.au
----------------------------------------------
Frank Warmerdam wrote:
On 10/13/05, Martin Tomko <[EMAIL PROTECTED]> wrote:
I am desperately seeking a tool/workflow o export vector data into
text/tables with basically the arc/node topological description of my data.
So If I export polygons, I need a table with the polygon IS and the IDs
of all its arcs, without any coordinates. Does anyone know a way?
I was thinking about postgress/postgis? Dump a shp in it and try an sql?
Would ogr2ogr do it somehow? I did not find a way to include the IDs of
the arcs of a polygon. Seems like export to CSV would help, but I need
to get the arcs IDs somehow.
Martin,
You didn't mention what data you are starting with. Is it a shapefile?
If so, part of your problems is that you need to build the topology from
a non-topological structure. As Flavio mentioned, FME would be a
good choice for that. GRASS also has support for converting
non-topological dataset to topological.
If you are already starting with a topological Arc/Info binary vector
coverage, then you will see from the ogrinfo reports that the topology
information is available as attributes.
OGRFeature(PAL):2
ArcIds (IntegerList) = (1:-349)
AREA (Real) = 0.92814
PERIMETER (Real) = 5.35872
COUNTRYD# (Integer) = 2
COUNTRYD-ID (Integer) = 3027
POLYGON ((-153.022781372070312 57.383213043212891,...
OGRFeature(ARC):1
UserId (Integer) = 1394
FNODE# (Integer) = 1
TNODE# (Integer) = 2
LPOLY# (Integer) = 24
RPOLY# (Integer) = 26
LINESTRING (56.360397338867188 25.983451843261719,...
The ArcIds on the polygons and the node/poly information on the
arcs is enough to establish the topological relationships. With a
script or C++ program written on OGR you could get that information
out into a text format of some kind.
If you use GRASS to export to E00 you could use avcimport to
convert to a binary coverage for use with OGR. FME can write
binary coverages directly. Of course, both FME and GRASS offer
other mechanisms to interact with the topology that might be more
direct.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, [EMAIL PROTECTED]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent