On 13-10-16 13:56, Amovic Mladen wrote:
> I'm writing some application using geotools library. As a database I use
> Oracle. There in schemas and tables I have stored numerical values of
> points/lines/polygons and in the other tables alfanumerical values which
> describes some attributes of these geometries. All of them are contected
> using Primary keys. In my App I implemented querylab class where I use
> cbox to choose which schema I want to import to mappane and visualize
> that data. But now I have a problem and I need to join three tables,
> where in one is sdogeometry and in the other two are
> alpha-numerical values as attributes. To avoid problem of redundancy of
> data the best solution is to join these tables as a view and call it to.
> But I don't know is possible to work with view in geotools, and with a
> cbox? Can you give me some advice?

I'm not sure what cbox is..

What's important when using views in oracle is that you make sure to add 
them to the USER_SDO_GEOM_METADATA (or global SDO_GEOM_METADATA) view 
using something like:

INSERT INTO USER_SDO_GEOM_METADATA VALUES (
     'YOUR_VIEW',
     'YOUR_VIEW_GEOMETRY_COLUMN',
-- lower left and upper right corners of your data
     MDSYS.SDO_DIM_ARRAY(MDSYS.SDO_DIM_ELEMENT('X', 12000, 281000, 
.1),MDSYS.SDO_DIM_ELEMENT('Y', 304000, 620000, .1)),
-- the crs code of your data
     28992
);



Also it can help to look into the gt_pk_metadata and geometry_columns 
metadata tables that you can make when using views.

see:
  - http://docs.geoserver.org/latest/en/user/data/database/primarykey.html
  - 
http://docs.geoserver.org/latest/en/user/data/database/oracle.html?highlight=geometry_columns

Mark




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GeoTools-GT2-Users mailing list
GeoTools-GT2-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-gt2-users

Reply via email to