[mapserver-dev] Point layers with Oracle driver

David Fuhry dfuhry at acm.org
Tue Feb 12 21:18:12 EST 2008


    Good suggestion.

SQL> select * from tt;

SDO_GEOMETRY(2001, 82247, NULL, SDO_ELEM_INFO_ARRAY(1, 1, 1), 
(544347.756, 4350295.7))

SQL> select sdo_geom.validate_geometry_with_context(geom, 0.000005) from tt;


    This one geometry in a large table in which the point geometry 
representations vary between SDO_POINT and SDO_ORDINATES.  The original 
data stored its ordinates in SDO_POINT, but a frontend app inserts new 
geometries with ordinates in SDO_ORDINATES.  The app developers 
construct Oracle JGeometry objects in java, then insert then using JDBC. 
  Obviously the process is pretty lax since the data is inserted as 
SDO_ORDINATES, and yet rendered identically by Oracle MapViewer.

    Here's some information on their oriented point extension: 



Fernando Simon wrote:
> Hi Daniel and David,
>     Well, about the SDO_POINT. The Mapserver driver just read the point
> data from SDO_POINT, from the Oracle Spatial manual (page 2.2, for point
> example and figure 2-6): "SDO_ELEM_INFO and SDO_ORDINATES are both NULL,
> as required if the SDO_POINT attribute is specified." And the SDO_POINT
> topic in the manual hint that you can just store points using the
> SDO_POINT attribute.
>     Maybe you can force the use of the
> geometry is valid, if it returns true and Mapserver can't draw, we have
> a bug :).
>     David, about the kind of the point that you wrote, the Mapserver
> can't draw it. I never head about it, I will read about it and other
> things for release 11 to check new features. Now a question for core
> developers, if I read angle data from database (like David wrote about
> the point) can I set the angle attribute for the layer? Will work, the
> angle?
>     We can check about this special kind of data, but I believe that
> Mapserver just need to draw the data/kinds/types defined in the 2-2
> table for SDO_ELEM_INFO.
>     Daniel, in my opinion the data that you report was wrong. You can
> write in the Oracle forum (in the OTN page) about it, the developers of
> the Oracle Spatial read and reply there.
>     Best regards.
> Fernando Simon
> David Fuhry wrote:
>> Daniel,
>> Point ordinates wouldn't ever be in SDO_ELEM_INFO; it only stores
>> metadata for how to interpret SDO_ORDINATES.
>> I'm not sure what MapServer does, but Oracle MapViewer will render a
>> point if the ordinates are stored in either the SDO_POINT or the
>> SDO_ORDINATES substructure of SDO_GEOMETRY.
>> Notably, 10g+ has a feature known as "oriented points", in which
>> SDO_POINT is null, and the (x,y[,z]) point ordinates are stored in
>> SDO_ORDINATES, and are followed by values (still in SDO_ORDINATES) which
>> describe an angle, for obvious use in labeling.
>> The correct behavior would be for MapServer to render the point at the
>> location stored in SDO_ORDINATES iff the SDO_POINT is null.
>> Thanks,
>> Dave
>> Daniel Morissette wrote:
>>> Fernando,
>>> I've had someone report to me that when MapServer reads point layers
>>> from Oracle, it works fine if the coordinates are stored in the
>>> SDO_POINT, but it doesn't work if they are stored in SDO_ELEM_INFO or
>>> SDO_ORDINATES which are apparently two other valid ways of storing
>>> point data.
>>> Are you aware of this issue? Is there a way around it or do you have
>>> any advice to provide to users who run into this problem?
>>> Thanks
>>> Daniel
>> _______________________________________________
>> mapserver-dev mailing list
>> mapserver-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-dev

More information about the mapserver-dev mailing list