<br><font size=2 face="sans-serif">Hi</font>
<br>
<br><font size=2 face="sans-serif">I think Daniel asked, how Mapserver-users
could deal with this issue in the case, they have</font>
<br><font size=2 face="sans-serif">no direct influence on the way points
are represented in the oracle-database.</font>
<br>
<br><font size=2 face="sans-serif">Maybe this is a workaround:</font>
<br><font size=2 face="sans-serif">...</font>
<br><font size=2 face="sans-serif">DATA "GEOMETRY FROM (SELECT <b>MDSYS.SDO_GEOM.SDO_CENTROID</b>(shape)
geometry,... FROM MYTABLE ) ...."</font>
<br><font size=2 face="sans-serif">...</font>
<br>
<br><font size=2 face="sans-serif">I didn't test it with mapserver. But
the following SQL-statement delivers "544347.756":</font>
<br><font size=2 face="sans-serif">SELECT MDSYS.SDO_GEOM.SDO_CENTROID(</font>
<br><font size=2 face="sans-serif">
SDO_GEOMETRY(2001, 82247, NULL, </font>
<br><font size=2 face="sans-serif">
SDO_ELEM_INFO_ARRAY(1, 1, 1), </font>
<br><font size=2 face="sans-serif">
SDO_ORDINATE_ARRAY(544347.756, 4350295.7)),</font>
<br><font size=2 face="sans-serif">
0.05).sdo_point.x</font>
<br><font size=2 face="sans-serif">FROM DUAL;</font>
<br>
<br><font size=2 face="sans-serif">It seems, that MDSYS.SDO_GEOM.SDO_CENTROID
converts the way a point is represented.</font>
<br>
<br><font size=2 face="sans-serif">Bye</font>
<br><font size=2 face="sans-serif">benedikt Rothe</font>
<br>
<br>
<br><tt><font size=2>mapserver-dev-bounces@lists.osgeo.org schrieb am 13.02.2008
03:18:12:<br>
<br>
> Fernando,<br>
> <br>
> Good suggestion.<br>
> <br>
> SQL> select * from tt;<br>
> <br>
> GEOM(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)<br>
> --------------------------------------------------------------------------------<br>
> SDO_GEOMETRY(2001, 82247, NULL, SDO_ELEM_INFO_ARRAY(1, 1, 1), <br>
> SDO_ORDINATE_ARRAY<br>
> (544347.756, 4350295.7))<br>
> <br>
> SQL> select sdo_geom.validate_geometry_with_context(geom, 0.000005)
from tt;<br>
> <br>
> SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT(GEOM,0.000005)<br>
> --------------------------------------------------------------------------------<br>
> TRUE<br>
> <br>
> This one geometry in a large table in which the point
geometry <br>
> representations vary between SDO_POINT and SDO_ORDINATES. The
original <br>
> data stored its ordinates in SDO_POINT, but a frontend app inserts
new <br>
> geometries with ordinates in SDO_ORDINATES. The app developers
<br>
> construct Oracle JGeometry objects in java, then insert then using
JDBC. <br>
> Obviously the process is pretty lax since the data is inserted
as <br>
> SDO_ORDINATES, and yet rendered identically by Oracle MapViewer.<br>
> <br>
> Here's some information on their oriented point extension:
<br>
> http://download-west.oracle.com/docs/cd/B19306_01/appdev.<br>
> 102/b14255/sdo_objrelschema.htm#CBBIGEFH<br>
> <br>
> Thanks,<br>
> <br>
> Dave<br>
> <br>
> <br>
> Fernando Simon wrote:<br>
> > Hi Daniel and David,<br>
> > Well, about the SDO_POINT. The Mapserver driver
just read the point<br>
> > data from SDO_POINT, from the Oracle Spatial manual (page 2.2,
for point<br>
> > example and figure 2-6): "SDO_ELEM_INFO and SDO_ORDINATES
are both NULL,<br>
> > as required if the SDO_POINT attribute is specified." And
the SDO_POINT<br>
> > topic in the manual hint that you can just store points using
the<br>
> > SDO_POINT attribute.<br>
> > Maybe you can force the use of the<br>
> > SDO_GEOM.VALIDATE_GEOMETRY_WITH_CONTEXT function to verify if
the<br>
> > geometry is valid, if it returns true and Mapserver can't draw,
we have<br>
> > a bug :).<br>
> > David, about the kind of the point that you wrote,
the Mapserver<br>
> > can't draw it. I never head about it, I will read about it and
other<br>
> > things for release 11 to check new features. Now a question for
core<br>
> > developers, if I read angle data from database (like David wrote
about<br>
> > the point) can I set the angle attribute for the layer? Will
work, the<br>
> > angle?<br>
> > We can check about this special kind of data, but
I believe that<br>
> > Mapserver just need to draw the data/kinds/types defined in the
2-2<br>
> > table for SDO_ELEM_INFO.<br>
> > Daniel, in my opinion the data that you report
was wrong. You can<br>
> > write in the Oracle forum (in the OTN page) about it, the developers
of<br>
> > the Oracle Spatial read and reply there.<br>
> > Best regards.<br>
> > <br>
> > Fernando Simon<br>
> > <br>
> > David Fuhry wrote:<br>
> >> Daniel,<br>
> >><br>
> >> Point ordinates wouldn't ever be in SDO_ELEM_INFO; it only
stores<br>
> >> metadata for how to interpret SDO_ORDINATES.<br>
> >><br>
> >> I'm not sure what MapServer does, but Oracle MapViewer will
render a<br>
> >> point if the ordinates are stored in either the SDO_POINT
or the<br>
> >> SDO_ORDINATES substructure of SDO_GEOMETRY.<br>
> >><br>
> >> Notably, 10g+ has a feature known as "oriented points",
in which<br>
> >> SDO_POINT is null, and the (x,y[,z]) point ordinates are
stored in<br>
> >> SDO_ORDINATES, and are followed by values (still in SDO_ORDINATES)
which<br>
> >> describe an angle, for obvious use in labeling.<br>
> >><br>
> >> The correct behavior would be for MapServer to render the
point at the<br>
> >> location stored in SDO_ORDINATES iff the SDO_POINT is null.<br>
> >><br>
> >> Thanks,<br>
> >><br>
> >> Dave<br>
> >><br>
> >><br>
> >> Daniel Morissette wrote:<br>
> >>> Fernando,<br>
> >>><br>
> >>> I've had someone report to me that when MapServer reads
point layers<br>
> >>> from Oracle, it works fine if the coordinates are stored
in the<br>
> >>> SDO_POINT, but it doesn't work if they are stored in
SDO_ELEM_INFO or<br>
> >>> SDO_ORDINATES which are apparently two other valid ways
of storing<br>
> >>> point data.<br>
> >>><br>
> >>> Are you aware of this issue? Is there a way around it
or do you have<br>
> >>> any advice to provide to users who run into this problem?<br>
> >>><br>
> >>> Thanks<br>
> >>><br>
> >>> Daniel<br>
> >> _______________________________________________<br>
> >> mapserver-dev mailing list<br>
> >> mapserver-dev@lists.osgeo.org<br>
> >> http://lists.osgeo.org/mailman/listinfo/mapserver-dev<br>
> >><br>
> _______________________________________________<br>
> mapserver-dev mailing list<br>
> mapserver-dev@lists.osgeo.org<br>
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev<br>
</font></tt>