[Shapelib] Multipatch creation error
Oscar Gomez Mateu
gomezmateu.oscar at gmail.com
Tue Sep 14 06:53:59 PDT 2010
Hi,
I attach all the shape related files.
How can I get the ShapeDump?
Thanks
Oscar
2010/9/14 Frank Warmerdam <warmerdam at pobox.com>
> Oscar Gomez Mateu wrote:
> > Hi,
> >
> > I am new to ShapeLib. I am ussing the .net wrapper available at the
> > project webpage. I have extended the wrapper to include the
> > SHPRewindObject() of version 1.2.10. My objective is to create a simple
> > multipatch building representation. Having a 2D building shape with an
> > elevation property, create a real 3D block (with min 6 faces) imitating
> > the building extrusion. I am able to do this with many polygonZ, but
> > then every building is composed of N different polygons. I want the
> > whole building to be a unique multipatch feature.
> >
> > 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-).
> >
> > NVERTICES = 9;
> > double[] bX = new double[NVERTICES] { 0, 10, 10, 0, 0,
> > 0, 0, 0, 0 };
> > double[] bY = new double[NVERTICES] { 0, 0, 10, 10, 0, 10,
> > 10, 0, 0 };
> > double[] bZ = new double[NVERTICES] { 10, 10, 10, 10, 10,
> > 10, 0, 0, 10 };
> > double[] bM = new double[NVERTICES] { 5, 5, 5, 5, 5, 5, 5,
> > 5, 5 };
> > ShapeLib.ShapeType shpType3 = ShapeLib.ShapeType.MultiPatch;
> >
> > int[] apartStart2 = new int[2] { 0, 4};
> > ShapeLib.PartType[] apartType2 = new ShapeLib.PartType[2] {
> > ShapeLib.PartType.TriangleFan, ShapeLib.PartType.Ring};
> >
> > pshpObj = ShapeLib.SHPCreateObject(shpType3, -1, 2,
> > apartStart2, apartType2, NVERTICES, bX, bY, bZ, bM);
> >
> > int j = ShapeLib.SHPRewindObject(hShp, pshpObj);
> > iRet = ShapeLib.SHPWriteObject(hShp, -1, pshpObj);
> > ShapeLib.SHPDestroyObject(pshpObj);
> >
> > The resulting file (the dbf is filled in a different part of the sample
> > application) is interpreted right by GlobalMapper (a simple GIS package)
> > but it is not rendered (even when the load launched no errors) by
> ArcScene.
> >
> > Any idea why is this?
>
> Oscar,
>
> Can you provide access to the generated file and/or show the shpdump
> result from this process?
>
> 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/20100914/ae995653/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testmultipatch.dbf
Type: application/octet-stream
Size: 238 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/shapelib/attachments/20100914/ae995653/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testmultipatch.sbn
Type: application/octet-stream
Size: 132 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/shapelib/attachments/20100914/ae995653/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testmultipatch.sbx
Type: application/octet-stream
Size: 116 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/shapelib/attachments/20100914/ae995653/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testmultipatch.shp
Type: application/octet-stream
Size: 400 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/shapelib/attachments/20100914/ae995653/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: testmultipatch.shx
Type: application/octet-stream
Size: 108 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/shapelib/attachments/20100914/ae995653/attachment-0004.obj>
More information about the Shapelib
mailing list