[Geotools-devel] [jira] Created: (GEOT-2765) Query rows with empty geometries produce exception
Query rows with empty geometries produce exception -- Key: GEOT-2765 URL: http://jira.codehaus.org/browse/GEOT-2765 Project: GeoTools Issue Type: Bug Components: data jdbc-ng Affects Versions: 2.5.7 Reporter: albert valls Attachments: browser_error.gif, geoserver FAILS.log, OracleDialect.java An error came up changing from geoserver 1.7.4 with the Old Oracle Datastore to the latest 1.7.6 with the Oracle NG Datastore. The WFS that before was working fine, now is failing. It queries an Oracle table with some rows that don't have geometry: select count(1) from activitats; COUNT(1) -- 1691 1 rows selected select count(1) from activitats where GEOM is null; COUNT(1) -- 17 1 rows selected I want to obtain the rows that don't have geometry, the WFS filter used is: http://www.opengis.net/ogc";> GEOM And at the attachment file you can see the logs produced at geoserver. The solution is to edit the java Class: org.geotools.data.oracle.OracleDialect replacing the following method: public Geometry decodeGeometryValue(GeometryDescriptor descriptor, ResultSet rs, String column, GeometryFactory factory, Connection cx ) throws IOException, SQLException { //read the geometry Geometry geom = readGeometry( rs, column, factory, cx ); //grab the binding Class targetClazz = descriptor.getType().getBinding(); // in Oracle you can have polygons in a column declared to be multipolygon, and so on... // so we better convert geometries, since our feature model is not so lenient if(targetClazz.equals(MultiPolygon.class) && geom instanceof Polygon){ if (geom == null) return factory.createMultiPolygon(null);// added avalls to suppport null/empty geometries else return factory.createMultiPolygon(new Polygon[] {(Polygon) geom}); } else if(targetClazz.equals(MultiPoint.class) && geom instanceof Point) { if (geom == null) return factory.createGeometryCollection(null);// added avalls to suppport null/empty geometries else return factory.createMultiPoint(new Point[] {(Point) geom}); } else if(targetClazz.equals(MultiLineString.class) && geom instanceof LineString) { if (geom == null) return factory.createMultiLineString(null);// added avalls to suppport null/empty geometries else return factory.createMultiLineString(new LineString[] {(LineString) geom}); } else if(targetClazz.equals(GeometryCollection.class)) { if (geom == null) return factory.createGeometryCollection(null);// added avalls to suppport null/empty geometries else return factory.createGeometryCollection(new Geometry[] {geom}); } return geom; } If you need further information don't hesitate to ask. albert -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
[Geotools-devel] how to set wps:ResponseForm for wps execute request?
Hi, on http://docs.codehaus.org/display/GEOTDOC/WPS+Plugin is described how to generate a WPSFactory and start the execute process with the input parameters. Not described is the possibility to set the wps:ResponseForm in the execute process like for example this one: ... ... input parameters here IdentifiedAffectedAreasFeatureCollection NumberOfIdentifiedAffectedAreas TotalProcessExecutionTime In particular the 'asReference="true"' is of interest for me for one of the result parameters. Is this done in the ProcessDescriptionType where I can set ProcessOutputsType? Or anywhere else? Thanks for any help. Matthias -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] how to set wps:ResponseForm for wps execute request?
That is a great question; when you make the request (ie in the standard) can you ask for different response types? I think it was supposed to be automatic - ie it was going to ask for the result in a format it could understand; and then parse the result into a java object for you. Example if a geotiff is being produced you would not need to know - a gridcoverage would show up in java for you to work with. I agree it may be useful to have more control here - as such we may need an api change. Jody On Wed, Oct 7, 2009 at 11:07 PM, Matthias Lendholt wrote: > Hi, > on http://docs.codehaus.org/display/GEOTDOC/WPS+Plugin is described how > to generate a WPSFactory and start the execute process with the input > parameters. > Not described is the possibility to set the wps:ResponseForm in the > execute process like for example this one: > > > ... > > ... input parameters here > > > > > IdentifiedAffectedAreasFeatureCollection > > > NumberOfIdentifiedAffectedAreas > > > TotalProcessExecutionTime > > > > > > In particular the 'asReference="true"' is of interest for me for one of > the result parameters. > > Is this done in the ProcessDescriptionType where I can set > ProcessOutputsType? Or anywhere else? > > > Thanks for any help. > > Matthias > > -- > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > ___ > Geotools-devel mailing list > Geotools-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/geotools-devel > -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] how to set wps:ResponseForm for wps execute request?
For me it would be even better to have the output value already in the client. But I get this exception org.eclipse.emf.common.util.BasicEList$BasicIndexOutOfBoundsException: index=0, size=0 at org.eclipse.emf.common.util.BasicEList.get(BasicEList.java:512) at org.geotools.data.wps.WPSUtils.createResultMap(WPSUtils.java:380) at org.geotools.data.wps.WPSProcess.execute(WPSProcess.java:143) at org.dews_online.geotools.wps.SimpleWpsConnector.executeProcess(SimpleWpsConnector.java:111) at de.gfz_potsdam.lendholt.geotools.AAISTest.main(AAISTest.java:60) There is one output paramater that could be the problem: IdentifiedAffectedAreasFeatureCollection The resulting feature collection that contains the Identified Affected Areas (returned as a zipped shapefile) application/zip base64 application/zip base64 I haven't debugged it but I guess the exception above is thrown for this parameter. It's a base64 encoded zip file containing a shapefile. Due to this I was thinking of fetching the file manually with the URL provided on 'asReference="true"' Matthias Jody Garnett schrieb: > That is a great question; when you make the request (ie in the > standard) can you ask for different response types? I think it was > supposed to be automatic - ie it was going to ask for the result in a > format it could understand; and then parse the result into a java > object for you. > > Example if a geotiff is being produced you would not need to know - a > gridcoverage would show up in java for you to work with. > > I agree it may be useful to have more control here - as such we may > need an api change. > > Jody > > On Wed, Oct 7, 2009 at 11:07 PM, Matthias Lendholt > wrote: >> Hi, >> on http://docs.codehaus.org/display/GEOTDOC/WPS+Plugin is described how >> to generate a WPSFactory and start the execute process with the input >> parameters. >> Not described is the possibility to set the wps:ResponseForm in the >> execute process like for example this one: >> >> >> ... >> >> ... input parameters here >> >> >> >> >> IdentifiedAffectedAreasFeatureCollection >> >> >> NumberOfIdentifiedAffectedAreas >> >> >> TotalProcessExecutionTime >> >> >> >> >> >> In particular the 'asReference="true"' is of interest for me for one of >> the result parameters. >> >> Is this done in the ProcessDescriptionType where I can set >> ProcessOutputsType? Or anywhere else? >> >> >> Thanks for any help. >> >> Matthias >> >> -- >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9 - 12, 2009. Register now! >> http://p.sf.net/sfu/devconference >> ___ >> Geotools-devel mailing list >> Geotools-devel@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/geotools-devel >> > -- Matthias Lendholt [matthias.lendh...@gfz-potsdam.de] tel: +49 331 288 1687; fax: +49 331 288 1703 Deutsches GeoForschungsZentrum (GFZ) Telegrafenberg A20; D14473 Potsdam; Germany -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
[Geotools-devel] color layer
Hi, How can I get color of a layer? Thanks Cintia BODY { font-family:Arial, Helvetica, sans-serif;font-size:12px; } -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
[Geotools-devel] XSD bounded integral type bindings
Hey, Jira is down so I can't create an issue for this. Let's do email: The xs bindings for integral types with restricted value space do fail to parse/encode due to some checks value range using its Java integer value rather than the long one, when the actual value exceeds the Java integer value range. The xsd value ranges for these types as -Ininity..0 or 0..Infinity, so it makes more sense to make the checks over their Java long values. Here's a patch, ok to apply?: Index: src/main/java/org/geotools/xs/bindings/XSNegativeIntegerBinding.java === --- src/main/java/org/geotools/xs/bindings/XSNegativeIntegerBinding.java (revision 34084) +++ src/main/java/org/geotools/xs/bindings/XSNegativeIntegerBinding.java (working copy) @@ -85,7 +85,7 @@ throws Exception { Number number = (Number) value; -if (number.intValue() == 0) { +if (number.longValue() == 0) { throw new IllegalArgumentException("negativeInteger value '" + number + "' required to be negative"); } Index: src/main/java/org/geotools/xs/bindings/XSNonNegativeIntegerBinding.java === --- src/main/java/org/geotools/xs/bindings/XSNonNegativeIntegerBinding.java (revision 34084) +++ src/main/java/org/geotools/xs/bindings/XSNonNegativeIntegerBinding.java (working copy) @@ -119,7 +119,7 @@ public String encode(Object object, String value) throws Exception { Number number = (Number) object; -if (number.intValue() < 0) { +if (number.longValue() < 0) { throw new IllegalArgumentException("Value '" + number + "' must be non-negative (0 or above)."); } Index: src/main/java/org/geotools/xs/bindings/XSNonPositiveIntegerBinding.java === --- src/main/java/org/geotools/xs/bindings/XSNonPositiveIntegerBinding.java (revision 34084) +++ src/main/java/org/geotools/xs/bindings/XSNonPositiveIntegerBinding.java (working copy) @@ -114,7 +114,7 @@ public String encode(Object object, String value) throws Exception { Number number = (Number) object; -if (number.intValue() > 0) { +if (number.longValue() > 0) { throw new IllegalArgumentException("Value '" + number + "' must be non-positive (0 or below)."); } Index: src/main/java/org/geotools/xs/bindings/XSPositiveIntegerBinding.java === --- src/main/java/org/geotools/xs/bindings/XSPositiveIntegerBinding.java (revision 34084) +++ src/main/java/org/geotools/xs/bindings/XSPositiveIntegerBinding.java (working copy) @@ -89,7 +89,7 @@ throws Exception { Number number = (Number) value; -if (number.intValue() < 1) { +if (number.longValue() < 1) { throw new IllegalArgumentException("positiveInteger value '" + number + "' must be positive."); } @@ -106,7 +106,7 @@ public String encode(Object object, String value) throws Exception { Number number = (Number) object; -if (number.intValue() == 0) { +if (number.longValue() == 0) { throw new IllegalArgumentException("positiveInteger value '" + number + "' must be positive."); } -- Gabriel Roldan OpenGeo - http://opengeo.org Expert service straight from the developers. -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] XSD bounded integral type bindings
Hi Gabriel, Yup, changes look good. Apply at your leisure. -Justin Gabriel Roldan wrote: > Hey, > > Jira is down so I can't create an issue for this. Let's do email: > > The xs bindings for integral types with restricted value space do fail > to parse/encode due to some checks value range using its Java integer > value rather than the long one, when the actual value exceeds the Java > integer value range. The xsd value ranges for these types as -Ininity..0 > or 0..Infinity, so it makes more sense to make the checks over their > Java long values. > > Here's a patch, ok to apply?: > > Index: src/main/java/org/geotools/xs/bindings/XSNegativeIntegerBinding.java > === > --- src/main/java/org/geotools/xs/bindings/XSNegativeIntegerBinding.java > (revision 34084) > +++ src/main/java/org/geotools/xs/bindings/XSNegativeIntegerBinding.java > (working copy) > @@ -85,7 +85,7 @@ > throws Exception { > Number number = (Number) value; > > -if (number.intValue() == 0) { > +if (number.longValue() == 0) { > throw new IllegalArgumentException("negativeInteger value > '" + number > + "' required to be negative"); > } > Index: > src/main/java/org/geotools/xs/bindings/XSNonNegativeIntegerBinding.java > === > --- > src/main/java/org/geotools/xs/bindings/XSNonNegativeIntegerBinding.java > (revision 34084) > +++ > src/main/java/org/geotools/xs/bindings/XSNonNegativeIntegerBinding.java > (working copy) > @@ -119,7 +119,7 @@ > public String encode(Object object, String value) throws Exception { > Number number = (Number) object; > > -if (number.intValue() < 0) { > +if (number.longValue() < 0) { > throw new IllegalArgumentException("Value '" + number > + "' must be non-negative (0 or above)."); > } > Index: > src/main/java/org/geotools/xs/bindings/XSNonPositiveIntegerBinding.java > === > --- > src/main/java/org/geotools/xs/bindings/XSNonPositiveIntegerBinding.java > (revision 34084) > +++ > src/main/java/org/geotools/xs/bindings/XSNonPositiveIntegerBinding.java > (working copy) > @@ -114,7 +114,7 @@ > public String encode(Object object, String value) throws Exception { > Number number = (Number) object; > > -if (number.intValue() > 0) { > +if (number.longValue() > 0) { > throw new IllegalArgumentException("Value '" + number > + "' must be non-positive (0 or below)."); > } > Index: src/main/java/org/geotools/xs/bindings/XSPositiveIntegerBinding.java > === > --- src/main/java/org/geotools/xs/bindings/XSPositiveIntegerBinding.java > (revision 34084) > +++ src/main/java/org/geotools/xs/bindings/XSPositiveIntegerBinding.java > (working copy) > @@ -89,7 +89,7 @@ > throws Exception { > Number number = (Number) value; > > -if (number.intValue() < 1) { > +if (number.longValue() < 1) { > throw new IllegalArgumentException("positiveInteger value > '" + number > + "' must be positive."); > } > @@ -106,7 +106,7 @@ > public String encode(Object object, String value) throws Exception { > Number number = (Number) object; > > -if (number.intValue() == 0) { > +if (number.longValue() == 0) { > throw new IllegalArgumentException("positiveInteger value > '" + number > + "' must be positive."); > } > > -- Justin Deoliveira OpenGeo - http://opengeo.org Enterprise support for open source geospatial. -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
[Geotools-devel] [jira] Created: (GEOT-2766) DiffFeatureReader getIndexedFeatures fails with FastBBox filter
DiffFeatureReader getIndexedFeatures fails with FastBBox filter --- Key: GEOT-2766 URL: http://jira.codehaus.org/browse/GEOT-2766 Project: GeoTools Issue Type: Bug Components: core main Environment: Windows XP, Java 1.5.0 Reporter: Emily Gouge Assignee: Jody Garnett Attachments: DiffFeatureReader.patch The DiffFeatureReader getIndexedFeatures() fails when the filter is a FastBBox filter as the FastBBox filter is not a GeometryFilter. I assumed this was a result of the fact that GeometryFilter was deprecated, so I updated these deprecated references to BinarySpatialOperator (the replacement) which fixed the issues I was having. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
[Geotools-devel] [jira] Created: (GEOT-2767) XS bindings for bounded integral types fail with to encode values larger than Integer.MAX_VALUE
XS bindings for bounded integral types fail with to encode values larger than Integer.MAX_VALUE --- Key: GEOT-2767 URL: http://jira.codehaus.org/browse/GEOT-2767 Project: GeoTools Issue Type: Bug Components: ext xml-xsd Affects Versions: 2.6-M3 Reporter: Gabriel Roldán Assignee: Gabriel Roldán Fix For: 2.6-RC1 The xs bindings for integral types with restricted value space do fail to parse/encode due to some checks value range using its Java integer value rather than the long one, when the actual value exceeds the Java integer value range. The xsd value ranges for these types as -Ininity..0 or 0..Infinity, so it makes more sense to make the checks over their Java long values. Here's a patch: {code} Index: src/main/java/org/geotools/xs/bindings/XSNegativeIntegerBinding.java === --- src/main/java/org/geotools/xs/bindings/XSNegativeIntegerBinding.java (revision 34084) +++ src/main/java/org/geotools/xs/bindings/XSNegativeIntegerBinding.java (working copy) @@ -85,7 +85,7 @@ throws Exception { Number number = (Number) value; -if (number.intValue() == 0) { +if (number.longValue() == 0) { throw new IllegalArgumentException("negativeInteger value '" + number + "' required to be negative"); } Index: src/main/java/org/geotools/xs/bindings/XSNonNegativeIntegerBinding.java === --- src/main/java/org/geotools/xs/bindings/XSNonNegativeIntegerBinding.java (revision 34084) +++ src/main/java/org/geotools/xs/bindings/XSNonNegativeIntegerBinding.java (working copy) @@ -119,7 +119,7 @@ public String encode(Object object, String value) throws Exception { Number number = (Number) object; -if (number.intValue() < 0) { +if (number.longValue() < 0) { throw new IllegalArgumentException("Value '" + number + "' must be non-negative (0 or above)."); } Index: src/main/java/org/geotools/xs/bindings/XSNonPositiveIntegerBinding.java === --- src/main/java/org/geotools/xs/bindings/XSNonPositiveIntegerBinding.java (revision 34084) +++ src/main/java/org/geotools/xs/bindings/XSNonPositiveIntegerBinding.java (working copy) @@ -114,7 +114,7 @@ public String encode(Object object, String value) throws Exception { Number number = (Number) object; -if (number.intValue() > 0) { +if (number.longValue() > 0) { throw new IllegalArgumentException("Value '" + number + "' must be non-positive (0 or below)."); } Index: src/main/java/org/geotools/xs/bindings/XSPositiveIntegerBinding.java === --- src/main/java/org/geotools/xs/bindings/XSPositiveIntegerBinding.java (revision 34084) +++ src/main/java/org/geotools/xs/bindings/XSPositiveIntegerBinding.java (working copy) @@ -89,7 +89,7 @@ throws Exception { Number number = (Number) value; -if (number.intValue() < 1) { +if (number.longValue() < 1) { throw new IllegalArgumentException("positiveInteger value '" + number + "' must be positive."); } @@ -106,7 +106,7 @@ public String encode(Object object, String value) throws Exception { Number number = (Number) object; -if (number.intValue() == 0) { +if (number.longValue() == 0) { throw new IllegalArgumentException("positiveInteger value '" + number + "' must be positive."); } {code} -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
[Geotools-devel] Reminder RC scheduled for Friday
Just a reminder that a release candidate is scheduled for Friday. I have seen a lot of activity this week; how is everyone doing for a Friday deadline? Jody -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel
Re: [Geotools-devel] Reminder RC scheduled for Friday
Simone, If possible, could you take a look at this coverage patch before the release candidate is packaged: http://jira.codehaus.org/browse/GEOT-2740 No worries if you're too busy. cheers Michael 2009/10/8 Jody Garnett : > Just a reminder that a release candidate is scheduled for Friday. > I have seen a lot of activity this week; how is everyone doing for a > Friday deadline? > > Jody -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Geotools-devel mailing list Geotools-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel