[Shapelib] Multipatch creation error

Oscar Gomez Mateu gomezmateu.oscar at gmail.com
Thu Sep 16 02:47:01 PDT 2010


Hi,

coming back on the Multipatch creation problem.

I created an application that takes 2D polygon shapes (attached
'simpleshape2.shp') and creates a 3D polygon shape imitating an extrusion.
Every original polygon turns into a bottom polygon (at 0 height), top
polygon (at RELELEV attribute height) and as many verticall walls as vertex
has the original polygon. An example can be seen in the attached
'simpleshape2_extr.shp'. In ArcGIS I merge all the polygons with the same ID
into a multipatch with the tool 'Layer 3D to Feature Class' and I get the
attached 'simpleshape2_extr_merge.shp'.

I then modified my application to create a multipatch shape as similar as
possible to the merged example. The result is the attached
'simpleshape2M_extr.shp'.

Doing a shapedump of the 2 end result shapes it is possible to see that they
are (beside the M values) identical. But 'simpleshape2_extr_merge.shp' gets
rendered in ArcScene and the features are considered 'MultipatchM' and
'simpleshape2M_extr.shp' is not rendered and the features are considered
PolygonZM.

Any idea what could be wrong?

Thanks
Oscar

2010/9/14 Frank Warmerdam <warmerdam at pobox.com>

>
> > Oscar Gomez Mateu wrote:
> >> I am having problems with the Multipatch creation. As an example, I
> >> create a Multipatch composed of 2 triangles in a TriangleFan (a
> >> horizontal square -4points-) and a Ring (a vertical square sharing on of
> >> the triangles lines -5 points-).
>
>
> Oscar,
>
> The shpdump for your file, created with the shpdump utility distributed
> as part of shapelib looks like this:
>
> warmerda at gdal64[109]% shpdump testmultipatch.shp
> Shapefile Type: PolygonZ   # of Shapes: 1
>
> File Bounds: (       0.000,       0.000,0,5)
>          to  (      10.000,      10.000,10,5)
>
> Shape:0 (MultiPatch)  nVertices=9, nParts=2
>   Bounds:(       0.000,       0.000, 0)
>       to (      10.000,      10.000, 10)
>      (       0.000,       0.000, 10) TriangleFan
>      (      10.000,       0.000, 10)
>      (      10.000,      10.000, 10)
>      (       0.000,      10.000, 10)
>    + (       0.000,       0.000, 10) Ring
>      (       0.000,      10.000, 10)
>      (       0.000,      10.000, 0)
>      (       0.000,       0.000, 0)
>      (       0.000,       0.000, 10)
>
> I have not done a complete analysis but it looks roughly plausible.
>
> I can't comment on why this would not display properly in ArcScene.
>
> 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<http://pobox.com/%7Ewarmerdam>
> and watch the world go round - Rush    | Geospatial Programmer for Rent
>
> _______________________________________________
> Shapelib mailing list
> Shapelib at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/shapelib
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/shapelib/attachments/20100916/d8eb4647/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SampleData.zip
Type: application/zip
Size: 6597 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/shapelib/attachments/20100916/d8eb4647/attachment.zip>


More information about the Shapelib mailing list