<HTML dir=ltr><HEAD><TITLE>[Gvsig_english] Question on GeoBD and Metadata when exporting toOracle</TITLE>
<META http-equiv=Content-Type content="text/html; charset=unicode">
<META content="MSHTML 6.00.6000.16890" name=GENERATOR></HEAD>
<BODY>
<DIV id=idOWAReplyText8409 dir=ltr>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>Hello, Wolfgang.</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>When you export a vector layer to Oracle Spatlai/Locator, the sequence of actions is as follows:</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>- if a table with the same name exists, it's deleted (dropped in cascade mode). This also removes spatial indices associated with the table</FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>- the new table is created</FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>- geometry metadata for this table name is removed (if existed)</FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>- new geometry metadata is written in USER_SDO_GEOM_METADATA</FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>- a spatial index on the geometry column is created</FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>- table records are added (no commits here)</FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>- a single final commit is performed</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>The tolerance parameter in the metadata is always set to 0.5. Dimension names are set to 'X', 'Y' and 'Z' (if needed) or 'LONGITUDE' and 'LATITUDE'. </FONT><FONT face="Times New Roman" color=#000000 size=3>Max. and min. values for X and Y are set according to the layer's bounding box. Min. and max. values for 'Z' (if needed) are always set to 0 and 100 (this </FONT><FONT face="Times New Roman" color=#000000 size=3>is not very nice, but has no bad effect since the Z value does not currently take part in any geometric operation). Dimension names can be anything you want. You could use 'BREITE' instead of 'LATITUDE', 'EASTING' instead of 'X' or whatever.</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr>SDO_TOLERANCE_1 and SDO_TOLERANCE_2 refer to tolerance for X and Y perhaps?</DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>Remember that the tolerance unit is implicit and depends on the table's coordinate system (SRID). If the SRID corresponds to a geodetic coordinate </FONT><FONT face="Times New Roman" color=#000000 size=3>system (latitude, longitude), then the tolerance is assumed to be expressed in meters. If the SRID corresponds to a projected coordinate system (such </FONT><FONT face="Times New Roman" color=#000000 size=3>as the German EPSG:3146X series) then the tolerance is assumed to be expressed in the same unit used by the coordinate system (usually meters). </FONT><FONT face="Times New Roman" color=#000000 size=3>This also applies if the SRID is NULL. According to this, it would be a bad idea to have a table with geometries whose vertices are in latitude and </FONT><FONT face="Times New Roman" color=#000000 size=3>longitude and setting the SRID to NULL, because the tolerance (0.5) would correspond to a few dozens of kilometers.</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>The tolerance settings are very unlikely to have any effect when you work with gvSIG because the application checks again the true relationship </FONT><FONT face="Times New Roman" color=#000000 size=3>between geometries after they have been converted to the gvSIG geometry model. In other words: the 'select by rectangle' tool should not behave in a </FONT><FONT face="Times New Roman" color=#000000 size=3>strange way even if you have a bad tolerance value. Of course you will see the effects of a bad tolerance value from other applications or when you </FONT><FONT face="Times New Roman" color=#000000 size=3>execute a SQL statement directly against your database.</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>So the metadata stored for a Oracle Spatial/Locator table are:</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>- Owner</FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>- Table name</FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>- Geometry column name (the metadata record will be replicated for several values because a table can have more than one geometry column)</FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>- Dimension info (for each dimension: dimension name, max value, min value, tolerance)</FONT></DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>- SRID (possibly NULL)</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>If you have a 3D vector layer (for example a 3D shapefile) I think you will not notice the third dimension while you work with views and layouts, but if you </FONT><FONT face="Times New Roman" color=#000000 size=3>export that layer to your Oracle Spatial/Locator database, it will be stored with a 3D geometry column (you can see the number of dimensions of each </FONT><FONT face="Times New Roman" color=#000000 size=3>using Sqldeveloper for example)</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>As you perhaps know, Oracle Spatial/Locator supports 4D geometries (XYZT, I think Oracle normally uses the letter T instead of M for the 4th </FONT><FONT face="Times New Roman" color=#000000 size=3>dimension). When you open one of these tables with gvSIG, the resulting layer is a 3D layer (4th dimension is discarded)</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>I have never heard about a parameter called resolution in the table metadata. Perhaps you are talking about some operations that allow you to restrict </FONT><FONT face="Times New Roman" color=#000000 size=3>the result by setting a min and max_resolution value, but this is not connected to tables' metadata.</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>I agree that it would be a good idea to let the user set the metadata values.</FONT></DIV>
<DIV dir=ltr> </DIV>
<DIV dir=ltr><FONT face="Times New Roman" color=#000000 size=3>Regards,</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New" size=2><FONT face="Times New Roman" size=3>Juan Lucas Domínguez Rubio<BR></FONT>---</FONT></DIV></DIV>
<DIV id=idSignature43918 dir=ltr>
<DIV><FONT face="Courier New" size=2><FONT face="Courier New" size=2><FONT face="Courier New" size=2>Prodevelop SL, Valencia (España)</FONT></DIV>
<DIV>
<DIV><FONT face="Courier New" size=2>Tlf.: 96.351.06.12 -- Fax: 96.351.09.68<BR></FONT><A href="http://www.prodevelop.es/"><FONT face="Courier New" size=2>http://www.prodevelop.es</FONT></A><BR><FONT face="Courier New" size=2>---</FONT></DIV></FONT></DIV></FONT></DIV>
<DIV dir=ltr><BR>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>De:</B> gvsig_internacional-bounces@listserv.gva.es en nombre de Wolfgang Qual<BR><B>Enviado el:</B> jue 24/09/2009 8:59<BR><B>Para:</B> Users and Developers mailing list<BR><B>Asunto:</B> [Gvsig_english] Question on GeoBD and Metadata when exporting toOracle<BR></FONT><BR></DIV>
<DIV>
<P><FONT size=2>Hi list,<BR>in our City administration, different GIS software is used to work with<BR>spatial data. Among them, ArcMap and gvSIG allow to access a central<BR>oracle spatial database. Thanks to the great GeoBD extension, accessing<BR>that database via gvSIG is very comfortable, even exporting new layers<BR>to the database is possible.<BR>Yesterday, a colleague of mine who is in charge of the overall design of<BR>the geodatabase asked me to provide some details on GeoBD's<BR>capabilities. He asked me about metadata that is created by that<BR>extension when exporting a shapefile to the oracle spatial database and<BR>possibilities to set custom settings for the metadata. In this context,<BR>he also talked about "tolerance" (SDO_TOLERANCE_1, SDO_TOLERANCE_2),<BR>"resolution". I have no idea, whether GeoBD sets these values.<BR>Therefore, I would be very happy, if someone of you (maybe the<BR>developers from Prodevelop) could give me some details on the type and<BR>values of metadata that is written to new oracle spatial layers. That<BR>would be very great to have.<BR><BR>Best regards and thank you very much for your help.<BR>Wolfgang<BR><BR>--<BR>Wolfgang Qual<BR>Landeshauptstadt München<BR>Referat für Gesundheit und Umwelt<BR>RGU-UW 11<BR>Sg. 1 Gesundheits- und Umweltberichterstattung,<BR>Energie und Klimaschutz<BR>Bayerstr. 28a, 80335 München<BR>Tel.: +49 (0)89 233-477 17<BR>Fax.: +49 (0)89 233-477 05<BR>E-Mail: wolfgang.qual@muenchen.de<BR><BR>_______________________________________________<BR>Gvsig_internacional mailing list<BR>Gvsig_internacional@listserv.gva.es<BR><A href="http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional">http://listserv.gva.es/cgi-bin/mailman/listinfo/gvsig_internacional</A><BR></FONT></P></DIV></BODY></HTML>