[postgis-devel] Re: [postgis-users] PostGIS and X3D - Adding a optionnal parameter for value -1

Olivier Courtin olivier.courtin at camptocamp.com
Tue Apr 10 02:38:32 PDT 2007


Quoting TECHER David <davidtecher at yahoo.fr>:

Hi David,

First please to me that this new kind of feature seem interresting :)

> I ask for that because parsing the coordIndex from a x3d file is not 
> possible. PostgreSQL reports to me the following error
>
> multidimensional arrays must have array expressions with matching dimensions
>
> for example something like array[[1,2,3][1,3,4][4,7,12,13]]
> That's the only solution I've found!

Well with the last week code, you should be able to import with something like
that:
array[[1,2,3,-1][1,3,4,-1][4,7,12,13]]

So a -1 in the initial array structure could be used to 'complete' an array
with ignorable value.
Of course it's still such an hack because imagine you have only one 
face with 10
nodes, and quite a few with only 3, you will have a lot of useless values...

Our first implementation (David and i) was initially designed to handle right
TIN structure (so it's always triangle), but as X3D also support variable
structures like square and so on... well it's was a quick and dirty way 
(i.e -1
useless value) to handle this feature...

For the moment the only 'clean' way to handle 3D structure storage in Postgis
seem to implement SFS 1.2 TIN and POLYHEDRON as said last week.

I don't have yet reaction for Paul or Sandro, if this new types could be add
in Postgis SVN, if such a patch provided.

My 2 cents,

--
Olivier



More information about the postgis-devel mailing list