Hi Nicklas, <br><br>What I meant is that a polygon is a two-dimensional shape, enclosing an area with its vertices that is in the same plane, coplanar. If you don't define your polygons this way it's impossible to know how to tesellate and render it. I don't know about the specification of polygons in postgis, but maybe it's up to the user to define its vertices correctly. I found this[1] in the postgis doc, see point 4.3.5, maybe it helps.<br>
<br>Greetz. <br><br>[1]<br><div class="gmail_quote">2011/1/19 Nicklas Avén <span dir="ltr"><<a href="mailto:nicklas.aven@jordogskog.no">nicklas.aven@jordogskog.no</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
sorry about off list posting<br>
<div class="im"><br>
<br>
<br>
<br>
On Wed, 2011-01-19 at 14:35 +0100, Jordi Torres wrote:<br>
> Hi Nicklas,<br>
><br>
> Please, let' s take this conversation "on-list". The attacments did<br>
> not pass the list control, that's the reason why I wrote to you<br>
> directly.<br>
> About generating 3D datasets it's simple if you have the data in .shp<br>
> (using shp2pgsql). That's the way I get my data.<br>
> In the other hand, a polygon cannot be in more than one plane in 3D,<br>
> if this is the case, this structure must be tessellated into triangles<br>
> or at least polygons in the same plane.<br>
<br>
</div>Well, what do you mean by cannot be in more than one plan?<br>
<br>
I understand that it cot can when it comes to rendering and so on.<br>
And it cannot when it comes to valid polygons.<br>
<br>
But you can express a polygon in wkt that has vertexpoints in more than<br>
one plan.<br>
<br>
for example:<br>
POLYGON((0 0 0,0 5 0, 0 5 5, 10 5 5, 10 5 0, 10 0 0, 0 0 0))<br>
<br>
In many examples the result is undefined and impossible to decide<br>
without more information and that's why I have to deal with it in<br>
distance calculations and send an error msg instead of trying to<br>
calculate the distance.<br>
<br>
Or am I missing something?<br>
<br>
Regards<br>
<font color="#888888">Nicklas<br>
</font><div><div></div><div class="h5"><br>
<br>
<br>
<br>
> (the same as openGL do when rendering concave polygons). May be the<br>
> tesselator included in the 3D extension eats this kind of structure,<br>
> but I don't trust.<br>
><br>
> About PostGis I am a noob or less than a noob. I only know the basics<br>
> to set a database and do a sql query. And I learned it yesterday :). I<br>
> am a 3D developer, and postgis is a tangential theme for me. So for<br>
> the questions about postGIS ask to the gurus in the list... ;)<br>
><br>
> Cheers.<br>
><br>
><br>
> 2011/1/19 Nicklas Avén <<a href="mailto:nicklas.aven@jordogskog.no">nicklas.aven@jordogskog.no</a>><br>
> Yes, that would be nice :-)<br>
><br>
> It is a little bit difficult to create 3D datasets I think, at<br>
> least if<br>
> the polygons contains more than 3 points (counting the first<br>
> and last as<br>
> 1) because they have to be in the same plan. That is the part<br>
> in the 3D<br>
> distance code that I am most worried about. Now there is no<br>
> real test if<br>
> people sends polygons not on one single plan to the function,<br>
> because<br>
> such a test is quite expensive to calculate if the polygon has<br>
> many<br>
> points. Also there have to be some tolerance.<br>
><br>
> Have you tried the PostGIS trunk lately?<br>
><br>
> It will be interesting to test and visualize<br>
> st_3d_shortestline through<br>
> gvSIG.<br>
><br>
> Cheers<br>
> Nicklas<br>
><br>
><br>
> On Wed, 2011-01-19 at 13:55 +0100, Jordi Torres wrote:<br>
> > Hi Nick,<br>
> ><br>
> > Is a lot of triangular separate polygons, if you want the<br>
> archive to<br>
> > do testing I can send it to you.<br>
> ><br>
> > Cheers.<br>
> ><br>
> > 2011/1/19 Nicklas Avén <<a href="mailto:nicklas.aven@jordogskog.no">nicklas.aven@jordogskog.no</a>><br>
> > Thanks a lot<br>
> ><br>
> > I will try it as soon as possible. When I have this<br>
> woking<br>
> > there will be<br>
> > a blog post about this extension and comming 3d<br>
> distance<br>
> > functions in<br>
> > postgis.<br>
> ><br>
> > Is TIN supported? or is it a lot of triangular<br>
> separate<br>
> > polygons in the<br>
> > example picture?<br>
> ><br>
> > Great work!<br>
> > Thanks<br>
> ><br>
> > /Nicklas<br>
> ><br>
> ><br>
> ><br>
> > On Wed, 2011-01-19 at 13:47 +0100, Jordi Torres<br>
> wrote:<br>
> > ><br>
> > ><br>
> > > ---------- Forwarded message ----------<br>
> > > From: Jordi Torres <<a href="mailto:jtorresfabra@gmail.com">jtorresfabra@gmail.com</a>><br>
> > > Date: 2011/1/19<br>
> > > Subject: Re: [Gvsig_english] PostGis + 3D<br>
> extension<br>
> > > To: Users and Developers mailing list<br>
> > > <<a href="mailto:gvsig_internacional@listserv.gva.es">gvsig_internacional@listserv.gva.es</a>><br>
> > ><br>
> > ><br>
> > > Hi Nicklas,<br>
> > ><br>
> > > Here you have attached a zip file. Substitute the<br>
> jars in<br>
> > the way Fran<br>
> > > told to you.<br>
> > ><br>
> > > And congrats to jaspa teams!! Good work!<br>
> > ><br>
> > > Cheers.<br>
> > ><br>
> > > 2011/1/19 Francisco José Peñarrubia<br>
> <<a href="mailto:fpenarru@gmail.com">fpenarru@gmail.com</a>><br>
> > ><br>
> > ><br>
> > > Hi.<br>
> > ><br>
> > > I just want to remark and say thanks to<br>
> JASPA team,<br>
> > who did<br>
> > > the hard work of this patch in gvSIG<br>
> Sprint. I hope<br>
> > we can use<br>
> > > it in 1.11 release.<br>
> > ><br>
> > > <a href="http://jaspa.forge.osor.eu/" target="_blank">http://jaspa.forge.osor.eu/</a><br>
> > ><br>
> > > Best regards.<br>
> > ><br>
> > > Jordi, please, can you send the latest<br>
> jars to<br>
> > Niklas?. I will<br>
> > > create a patch and upload it to the<br>
> repository.<br>
> > ><br>
> > > El 19/01/2011 13:30, Jordi Torres<br>
> escribió:<br>
> > > ><br>
> > > > Hi Nick and Fran,<br>
> > > ><br>
> > > > I have started a new thread in the list,<br>
> this way<br>
> > we won't<br>
> > > > merge topics.<br>
> > > ><br>
> > > > Fran has fixed the issues and now we are<br>
> able to<br>
> > see 3D<br>
> > > > geometries using postigs (attached is a<br>
> screenshot<br>
> > of a 3D<br>
> > > > polygons layer). By the way, polyhedral<br>
> is not<br>
> > supported by<br>
> > > > gvSIG postGis driver (even I don't now<br>
> if it is<br>
> > OGC<br>
> > > > compliant), so you have to decompose it<br>
> in<br>
> > polygons.<br>
> > > ><br>
> > > > Cheers!<br>
> > > ><br>
> > > > --<br>
> > > > Jordi Torres Fabra<br>
> > > ><br>
> > > > gvSIG 3D blog<br>
> > > > <a href="http://gvsig3d.blogspot.com" target="_blank">http://gvsig3d.blogspot.com</a><br>
> > > > Instituto de Automática e Informática<br>
> Industrial<br>
> > > > <a href="http://www.ai2.upv.es" target="_blank">http://www.ai2.upv.es</a><br>
> > > ><br>
> > > ><br>
> > > ><br>
> _______________________________________________<br>
> > > > Gvsig_internacional mailing list<br>
> > > > <a href="mailto:Gvsig_internacional@listserv.gva.es">Gvsig_internacional@listserv.gva.es</a><br>
> > > ><br>
> ><br>
> <a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br>
> > ><br>
> > > --<br>
> > > Fran Peñarrubia<br>
> > > Scolab<br>
> > > <a href="http://www.scolab.es" target="_blank">www.scolab.es</a><br>
> > ><br>
> > > Asociación gvSIG<br>
> > > <a href="http://www.gvsig.com" target="_blank">www.gvsig.com</a><br>
> > ><br>
> > ><br>
> _______________________________________________<br>
> > > Gvsig_internacional mailing list<br>
> > > <a href="mailto:Gvsig_internacional@listserv.gva.es">Gvsig_internacional@listserv.gva.es</a><br>
> > ><br>
> ><br>
> <a href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional" target="_blank">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</a><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > --<br>
> > > Jordi Torres Fabra<br>
> > ><br>
> > > gvSIG 3D blog<br>
> > > <a href="http://gvsig3d.blogspot.com" target="_blank">http://gvsig3d.blogspot.com</a><br>
> > > Instituto de Automática e Informática Industrial<br>
> > > <a href="http://www.ai2.upv.es" target="_blank">http://www.ai2.upv.es</a><br>
> > ><br>
> > ><br>
> > ><br>
> > ><br>
> > > --<br>
> > > Jordi Torres Fabra<br>
> > ><br>
> > > gvSIG 3D blog<br>
> > > <a href="http://gvsig3d.blogspot.com" target="_blank">http://gvsig3d.blogspot.com</a><br>
> > > Instituto de Automática e Informática Industrial<br>
> > > <a href="http://www.ai2.upv.es" target="_blank">http://www.ai2.upv.es</a><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> ><br>
> > --<br>
> > Jordi Torres Fabra<br>
> ><br>
> > gvSIG 3D blog<br>
> > <a href="http://gvsig3d.blogspot.com" target="_blank">http://gvsig3d.blogspot.com</a><br>
> > Instituto de Automática e Informática Industrial<br>
> > <a href="http://www.ai2.upv.es" target="_blank">http://www.ai2.upv.es</a><br>
><br>
><br>
><br>
><br>
><br>
><br>
> --<br>
> Jordi Torres Fabra<br>
><br>
> gvSIG 3D blog<br>
> <a href="http://gvsig3d.blogspot.com" target="_blank">http://gvsig3d.blogspot.com</a><br>
> Instituto de Automática e Informática Industrial<br>
> <a href="http://www.ai2.upv.es" target="_blank">http://www.ai2.upv.es</a><br>
<br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Jordi Torres Fabra<br><br>gvSIG 3D blog<br><a href="http://gvsig3d.blogspot.com">http://gvsig3d.blogspot.com</a><br>Instituto de Automática e Informática Industrial <br>
<a href="http://www.ai2.upv.es">http://www.ai2.upv.es</a><br>