<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML xmlns:o = "urn:schemas-microsoft-com:office:office"><HEAD>
<META http-equiv=Content-Type content="text/html; charset=koi8-r">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>
<DIV><FONT face=Arial size=2>Hi Alexey</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman" size=3>I've imported
polygonal Shapefiles into VTK via Python and Tcl scripts, just to see
if I was getting it right. My time-frame for a vtkShapefileReader was
the Christmas holidays - I wanted to test some scripts on multi-patch
Shapefiles (which would be the most difficult case) before I moved to
C++.</FONT></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face="Times New Roman"
size=3></FONT></FONT> </DIV>
<DIV>As the record structures vary from type to type I thought it made
sense to have a separate file-header reader and record-header
reader and then subclass a record-contents reader to handle
particular types - the appropriate subclass would be instantiated by the
file-header reader. This would allow for easy additions should ESRI
extend the number of shape types and also allow reading of mixed-types if
allowed later.</DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>None of the shapefile libraries I've come across so far are OO, plus
you still have to convert their output into VTK datasets - so I think it makes
sense to start from scratch and take advantage of vtk reader infrastructure
already available. </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV>I've also read dBase attribute files (just as binary) through Python
scripts - it should be pretty easy to knock together a data-object source for
those that don't want to connect to a database.</DIV>
<DIV> </DIV>
<DIV>Have you read the shapefile white paper on the ESRI site?</DIV>
<DIV> </DIV>
<DIV>Malcolm Drummond</DIV>
<DIV>GeoVision cc</DIV></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=yutkin@geol.msu.ru href="mailto:yutkin@geol.msu.ru">Alexey Yutkin</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=vtkusers@public.kitware.com
href="mailto:vtkusers@public.kitware.com">vtkusers@public.kitware.com</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, November 06, 2002 1:03
AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [vtkusers] How can I add ESRI
Shape Files supporting to VTK?</DIV>
<DIV><BR></DIV>
<DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US
style="mso-ansi-language: EN-US">I plane to add ESRI Shape Files supporting
for VTK. <SPAN style="mso-spacerun: yes"> </SPAN><SPAN
style="mso-spacerun: yes"> </SPAN>I think the simple way is using “the
Shapefile C Library by Frank Warmerdam” for direct Shapefiles IO.
<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US
style="mso-ansi-language: EN-US">Which steps must I do? Where can I find more
detailed information about
this?<o:p></o:p></SPAN></P></DIV></BLOCKQUOTE></BODY></HTML>