[Geoserver-devel] How to create own oracle ng extension

Hi everybody,

i want to make some changes on the oracle ng extension because our data
tables have a very special structure with 3 geometry columns.

I found the code of the jar files on:
https://svn.osgeo.org/geotools/tags/2.5.6/modules/unsupported/jdbc-ng.
I tried to compile the java files to generate my own jar files but it did
not work with geoserver.
Im new in working with subversion and maven so if anyone could give me a
manual how to create my own jar files or has some tips i would be very
thankful.

Thanks for any posts!

Howie

--
View this message in context: http://www.nabble.com/How-to-create-own-oracle-ng-extension-tp24802788p24802788.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

Howie.Stuntman ha scritto:

Hi everybody,

i want to make some changes on the oracle ng extension because our data
tables have a very special structure with 3 geometry columns.

May I ask what special treatment you need?

I found the code of the jar files on:
https://svn.osgeo.org/geotools/tags/2.5.6/modules/unsupported/jdbc-ng.
I tried to compile the java files to generate my own jar files but it did
not work with geoserver.
Im new in working with subversion and maven so if anyone could give me a
manual how to create my own jar files or has some tips i would be very
thankful.

Each GeoServer release requires a specific correspondent GeoTools release, since the internal API might have changed.
Which GeoServer release are you using? By knowing that I can point
you to the proper gt2 tag.

As for generating the jar it's just "mvn install" in the oracle-ng
directory.

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Andrea Aime-4 wrote:

May I ask what special treatment you need?

Our tables have 3 geometry columns (one for Points, one for Lines and one
for polygons). Thats why the table is used by another GIS wich definitly
needs this structure. An objekt of this table could consist of Points,
Lines, and Polygons. The oracle ng extension now only takes the first
geometry column and shows it on the map. I would try to change it that it is
able to use all 3 geometry columns.

Andrea Aime-4 wrote:

Which GeoServer release are you using? By knowing that I can point
you to the proper gt2 tag.

Im using the geoserver version 1.7.5

Thanks
Howie
--
View this message in context: http://www.nabble.com/How-to-create-own-oracle-ng-extension-tp24802788p24803817.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

Howie.Stuntman ha scritto:

Andrea Aime-4 wrote:

May I ask what special treatment you need?

Our tables have 3 geometry columns (one for Points, one for Lines and one
for polygons). Thats why the table is used by another GIS wich definitly
needs this structure. An objekt of this table could consist of Points,
Lines, and Polygons. The oracle ng extension now only takes the first
geometry column and shows it on the map. I would try to change it that it is
able to use all 3 geometry columns.

You just need to play with SLD, each symbolizer has a geometry
name element allowing you to decide which geometry column to use.
E.g., from the SLD 1.0 spec, page 33:

<xs:element name="LineSymbolizer">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="sld:Geometry" minOccurs="0"/>
       <xs:element ref="sld:Stroke" minOccurs="0"/>
     </xs:sequence>
   </xs:complexType>
</xs:element>

"The Geometry element of a LineSymbolizer defines the linear geometry to be used
for styling. The Geometry element is optional and if it is absent then the “default”
geometry property of the feature type that is used in the containing FeatureStyleType
is used.
"

Andrea Aime-4 wrote:

Which GeoServer release are you using? By knowing that I can point
you to the proper gt2 tag.

Im using the geoserver version 1.7.5

Then gt2 2.5.6 should be the one
Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Andrea Aime-4 wrote:

You just need to play with SLD, each symbolizer has a geometry
name element allowing you to decide which geometry column to use.
E.g., from the SLD 1.0 spec, page 33:

<xs:element name="LineSymbolizer">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="sld:Geometry" minOccurs="0"/>
       <xs:element ref="sld:Stroke" minOccurs="0"/>
     </xs:sequence>
   </xs:complexType>
</xs:element>

"The Geometry element of a LineSymbolizer defines the linear geometry to
be used
for styling. The Geometry element is optional and if it is absent then
the “default”
geometry property of the feature type that is used in the containing
FeatureStyleType
is used.
"

Nice Tip but there is another Problem. The bjects also can consist of
different gometries (for example one object can consist of 2 Polygons and 1
Line), thats why i want to make a geometrycollection of this three columns
for each object.

I would also need more detailed instructions how to build the oracle ng jar
files because i got a problem by creating with maven.

what i've done:

I checked out the geotools folder at:
https://svn.osgeo.org/geotools/tags/2.5.6

After that i tried to build the jar files with maven with "mvn install" on
the jdbc-ng Folder.

I got the Error "BUILD FAILURE" (A required plugin was not found)
(Unable to find resource
'org.geotools.maven:jar-collector:maven-plugin:2.5.6' in repository
central(http://repo1.maven.org/maven2))

Have i done something wrong?

Thanks
Howie

--
View this message in context: http://www.nabble.com/How-to-create-own-oracle-ng-extension-tp24802788p24805318.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.

Howie.Stuntman ha scritto:

Andrea Aime-4 wrote:

You just need to play with SLD, each symbolizer has a geometry
name element allowing you to decide which geometry column to use.
E.g., from the SLD 1.0 spec, page 33:

<xs:element name="LineSymbolizer">
   <xs:complexType>
     <xs:sequence>
       <xs:element ref="sld:Geometry" minOccurs="0"/>
       <xs:element ref="sld:Stroke" minOccurs="0"/>
     </xs:sequence>
   </xs:complexType>
</xs:element>

"The Geometry element of a LineSymbolizer defines the linear geometry to be used
for styling. The Geometry element is optional and if it is absent then the “default”
geometry property of the feature type that is used in the containing FeatureStyleType
is used.
"

Nice Tip but there is another Problem. The bjects also can consist of
different gometries (for example one object can consist of 2 Polygons and 1
Line), thats why i want to make a geometrycollection of this three columns
for each object.

That will likely result in a graphic mess. For example, by SLD when you apply a point symbolizer to a geometry, you extract its centroid (no
matter if point, line, polygon or collection) and draw the point
according to the symbolizer spec.
When you apply a polygon symbolizer, point won't be drawn, but lines
will be closed and then filled (again, behaviour mandated by the SLD
spec).

By mixing geometries together in a collection you'll loose any ability
to control what you're drawing.

I got the Error "BUILD FAILURE" (A required plugin was not found) (Unable to find resource
'org.geotools.maven:jar-collector:maven-plugin:2.5.6' in repository
central(http://repo1.maven.org/maven2))

Ah, I guess the jars were not deployed on the repository.
Anyways, cd build/maven, build there, then go back to the
root and do a full GeoTools build with
mvn install -DskipTests
then you should be good to go

Cheers
Andrea

--
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

Thanks for your help Andrea

It works now!

I will now try to solve my problem with the 3 geometry columns.

cheers
Howie
--
View this message in context: http://www.nabble.com/How-to-create-own-oracle-ng-extension-tp24802788p24808818.html
Sent from the GeoServer - Dev mailing list archive at Nabble.com.