[postgis-users] test for asX3D() for PostGIS 1.2.2 SVN

TECHER David davidtecher at yahoo.fr
Tue May 22 09:45:22 PDT 2007


Hi

thanks to the patch from Marc,


 I apply the some idea from his patch for asx3d() done by

David Desbuisson and Olivier Courtin 


from 
http://postgis.refractions.net/pipermail/postgis-users/2007-April/015166.html.

This works too :).


 In lwgeom/lwgeom_x3d.c at line 105, replace

VARATT_SIZEEP(result) = len;

by

SET_VARSIZE(result,len);

For example

testgis=# select asx3d(geomfromewkt('SRID=-1;MULTIPOINT(1.0 -1.0 -1.0, 
1.0 -1.0 1.0,
-1.0 -1.0 1.0, -1.0 -1.0 -1.0, 1.0 1.0 -1.0, 1.0 1.0 1.0, -1.0 1.0 1.0, 
-1.0 1.0 -1.0)'),
 array[[0,1,2,3],[4,7,6,5],[0,4,5,1],[1,5,6,2],[2,6,7,3],[4,0,3,7]]);
                                                                                               
asx3d
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 <IndexedFaceSet 
coordIndex='0,1,2,3,-1,4,7,6,5,-1,0,4,5,1,-1,1,5,6,2,-1,2,6,7,3,-1,4,0,3,7'>
<Coordinate point='1 -1 -1,1 -1 1,-1 -1 1,-1 -1 -1,1 1 -1,1 1 1,-1 1 
1,-1 1 -1'/>
</IndexedFaceSet>

I asks myself about the use of XML native support from Postgresql 8.3. 
It should be very interesting for some useful output!

--david;

	

	
		
___________________________________________________________________________ 
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son interface révolutionnaire.
http://fr.mail.yahoo.com



More information about the postgis-users mailing list