Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-users] Detecting geometry type of Oracle views

It is easy to configure Oracle with a generic SDO_GEOMETRY data type, rather than something more specific like SDO_POINT (ie specific GTYPE restriction).
And the GeoTools library we use for data access will only report a specific Geometry type when it can figure it out. I cannot remember where it gets that information from, perhaps the spatial index or 

The default style should be flexible enough to support mixed content (ie if you do have SDO_GEOMETRY you can store points, lines and polygons in the same table).

As this is fairly common, in PostGIS as well as Oracle, we have the radio buttons int the style editor so you can switch your layer to Point if you "know" it only contains points for example.

There is a bit of information here: http://docs.oracle.com/cd/B19306_01/appdev.102/b14255/sdo_objrelschema.htm

can you confirm that the Geometry Type for the resulting Layer is "Polygon". I'm wondering because Oracle JDBC datastore tries to read the type from Oracle Metadata and I guess nothing can be found for views. If this is the case the generic type "Geometry" is used for Geometry-Mapping (See here :  https://github.com/geotools/geotools/blob/master/modules/plugin/jdbc/jdbc-oracle/src/main/java/org/geotools/data/oracle/OracleDialect.java#L211). 

Not sure about the generator for default styling in uDIG if the type is Geoemtry. Maybe it guesses and uses LineStings as Default.. @Jody: could you jump in ?

HTH,
- Frank


2013/9/4 Peilke, Hendrik <hendrik.peilke@xxxxxxxxx>

Hi,

 

when I added a database view from an Oracle Spatial database as a layer to my map in uDig 1.4, I discovered that the geometry type of that layer wasn’t determined correctly (line instead of polygon). Adding the underlying table directly as a layer to the map gives the right layer type (polygon). This is not a single case scenario, but happened to me every time I tried to add a polygon view. Can I configure something inside the database to let uDig know the type of the view layer?

 

Regards,

Hendrik Peilke



IBYKUS AG für Informationstechnologie, Erfurt / HRB 108616 - D-Jena / Vorstand: Helmut C. Henkel, Dr. Lutz Richter
Vorsitzender des Aufsichtsrates: Dr. Wolfgang Habel

_______________________________________________
udig-users mailing list
udig-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.refractions.net/mailman/listinfo/udig-users




Back to the top