Re: [Geoserver-users] GeoServer 2.2beta2 cannot compute BBOX on SQL Server data

2012-07-09 Thread Andrea Aime
On Mon, Jul 9, 2012 at 3:09 AM, Luca Morandini lmorand...@ieee.org wrote:
 On 07/03/2012 10:27 PM, Andrea Aime wrote:
 On Tue, Jul 3, 2012 at 2:16 PM, Luca Morandini lmorand...@ieee.org
 mailto:lmorand...@ieee.org wrote:

 Actually, we solved this by running STValid on all the geometries in the 
 table: it
 seems SRS and BBOX are not computed when there's at least one invalid 
 geometry.

Not being able to compute the bbox is normal, sql server itself throws
exceptions
while computing the aggregated bbox.

Not being able to compute the srs is odd though, all we do to get it
is to retrieve
the srid of the first non null geometry, I don't believe we make any
validity check while
doing so

Cheers
Andrea

-- 
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:  +39 0584 962313
mob:+39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf

--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] GeoServer 2.2beta2 cannot compute BBOX on SQL Server data

2012-07-08 Thread Luca Morandini
On 07/03/2012 10:27 PM, Andrea Aime wrote:
 On Tue, Jul 3, 2012 at 2:16 PM, Luca Morandini lmorand...@ieee.org
 mailto:lmorand...@ieee.org wrote:

Actually, we solved this by running STValid on all the geometries in the table: 
it 
seems SRS and BBOX are not computed when there's at least one invalid geometry.

Regards,

Luca Morandini
Data Architect - AURIN project
Department of Computing and Information Systems
University of Melbourne
Tel. +61 03 903 58 380
Skype: lmorandini




--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


[Geoserver-users] GeoServer 2.2beta2 cannot compute BBOX on SQL Server data

2012-07-03 Thread Luca Morandini
This issue pops up from time to time, this time it happened to me...

- GeoServer 2.2beta2 (and related SQL Server plugin) on Ubuntu
- SQL Server 2008 R2 on Windows 7
- Polygos data loaded from shapefile with OGR2OGR
- SRID defined in the OGR2OGR command lne
- Spatial index created with correct bounds

...but still SRS and BBOX are empty, and when SRS is set by hand and then 
Compute 
from data is clicked:
java.lang.RuntimeException: java.io.IOException: Error occured calculating 
bounds
at 
org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:508)
at 
org.geotools.jdbc.JDBCFeatureStore.getBoundsInternal(JDBCFeatureStore.java:189)
at 
org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSource.java:426)
at
...
org.geotools.data.sqlserver.SQLServerDialect.decodeGeometryEnvelope(SQLServerDialect.java:272)
at org.geotools.jdbc.JDBCDataStore.getBounds(JDBCDataStore.java:1159)
... 94 more
Caused by: org.opengis.referencing.NoSuchAuthorityCodeException: No code 
EPSG:0 
from authority European Petroleum Survey Group found for object of type 
IdentifiedObject.
at 
org.geotools.referencing.factory.AbstractAuthorityFactory.noSuchAuthorityCode(AbstractAuthorityFactory.java:951)
at 
org.geotools.referencing.factory.PropertyAuthorityFactory.getWKT(PropertyAuthorityFactory.java:316)
at 
org.geotools.referencing.factory.PropertyAuthorityFactory.createCoordinateReferenceSystem(PropertyAuthorityFactory.java:390)
at 
org.geotools.referencing.factory.BufferedAuthorityFactory.createCoordinateReferenceSystem(BufferedAuthorityFactory.java:783)
at 
org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:800)
at 
org.geotools.referencing.factory.FallbackAuthorityFactory.createCoordinateReferenceSystem(FallbackAuthorityFactory.java:640)
at 
org.geotools.referencing.factory.AuthorityFactoryAdapter.createCoordinateReferenceSystem(AuthorityFactoryAdapter.java:800)
at 
org.geotools.referencing.factory.ThreadedAuthorityFactory.createCoordinateReferenceSystem(ThreadedAuthorityFactory.java:731)
at 
org.geotools.referencing.DefaultAuthorityFactory.createCoordinateReferenceSystem(DefaultAuthorityFactory.java:179)
at org.geotools.referencing.CRS.decode(CRS.java:489)
at org.geotools.referencing.CRS.decode(CRS.java:417)
at 
org.geotools.data.sqlserver.SQLServerDialect.decodeGeometry(SQLServerDialect.java:245)
... 96 more

Regards,

Luca Morandini
Data Architect - AURIN project
Department of Computing and Information Systems
University of Melbourne
Tel. +61 03 903 58 380
Skype: lmorandini



--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] GeoServer 2.2beta2 cannot compute BBOX on SQL Server data

2012-07-03 Thread Andrea Aime
On Tue, Jul 3, 2012 at 10:09 AM, Luca Morandini lmorand...@ieee.org wrote:

 This issue pops up from time to time, this time it happened to me...

 - GeoServer 2.2beta2 (and related SQL Server plugin) on Ubuntu
 - SQL Server 2008 R2 on Windows 7
 - Polygos data loaded from shapefile with OGR2OGR
 - SRID defined in the OGR2OGR command lne
 - Spatial index created with correct bounds

 ...but still SRS and BBOX are empty, and when SRS is set by hand and then
 Compute
 from data is clicked:
 Caused by: org.opengis.referencing.NoSuchAuthorityCodeException: No code
 EPSG:0
 from authority European Petroleum Survey Group found for object of type
 IdentifiedObject.


Ah right, SQL Server uses 0 instead of -1 for unkown CRS. I believe there
was a
bug report for this one already, if not a fix already?  Not sure

Cheers
Andrea

-- 
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:  +39 0584 962313
mob:+39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] GeoServer 2.2beta2 cannot compute BBOX on SQL Server data

2012-07-03 Thread Luca Morandini
On 07/03/2012 06:42 PM, Andrea Aime wrote:
 On Tue, Jul 3, 2012 at 10:09 AM, Luca Morandini lmorand...@ieee.org
 mailto:lmorand...@ieee.org wrote:

 This issue pops up from time to time, this time it happened to me...

 - GeoServer 2.2beta2 (and related SQL Server plugin) on Ubuntu
 - SQL Server 2008 R2 on Windows 7
 - Polygos data loaded from shapefile with OGR2OGR
 - SRID defined in the OGR2OGR command lne
 - Spatial index created with correct bounds

 ...but still SRS and BBOX are empty, and when SRS is set by hand and then 
 Compute
 from data is clicked:
 Caused by: org.opengis.referencing.NoSuchAuthorityCodeException: No code 
 EPSG:0
 from authority European Petroleum Survey Group found for object of type
 IdentifiedObject.


 Ah right, SQL Server uses 0 instead of -1 for unkown CRS. I believe there 
 was a
 bug report for this one already, if not a fix already?  Not sure

I searched Jira for SQL Server  unknown CRS , but fond none.

Regards,

Luca Morandini
Data Architect - AURIN project
Department of Computing and Information Systems
University of Melbourne
Tel. +61 03 903 58 380
Skype: lmorandini




--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] GeoServer 2.2beta2 cannot compute BBOX on SQL Server data

2012-07-03 Thread Andrea Aime
On Tue, Jul 3, 2012 at 11:16 AM, Luca Morandini lmorand...@ieee.org wrote:

 I searched Jira for SQL Server  unknown CRS , but fond none.


I believe this is the one: https://jira.codehaus.org/browse/GEOS-5077

Cheers
Andrea

-- 
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:  +39 0584 962313
mob:+39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users


Re: [Geoserver-users] GeoServer 2.2beta2 cannot compute BBOX on SQL Server data

2012-07-03 Thread Andrea Aime
On Tue, Jul 3, 2012 at 2:16 PM, Luca Morandini lmorand...@ieee.org wrote:

 On 07/03/2012 08:19 PM, Andrea Aime wrote:
  On Tue, Jul 3, 2012 at 11:16 AM, Luca Morandini lmorand...@ieee.org
  mailto:lmorand...@ieee.org wrote:
 
  I searched Jira for SQL Server  unknown CRS , but fond
 none.
 
 
  I believe this is the one: https://jira.codehaus.org/browse/GEOS-5077

 Any suggestions on how to solve this ?


Modify this class:
https://github.com/geotools/geotools/blob/master/modules/plugin/jdbc/jdbc-sqlserver/src/main/java/org/geotools/data/sqlserver/SQLServerDialect.java

and then add a test, and double check the modification did not break
any of the other tests

Cheers
Andrea

-- 
Ing. Andrea Aime
GeoSolutions S.A.S.
Tech lead

Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy

phone: +39 0584 962313
fax:  +39 0584 962313
mob:+39 339 8844549

http://www.geo-solutions.it
http://geo-solutions.blogspot.com/
http://www.youtube.com/user/GeoSolutionsIT
http://www.linkedin.com/in/andreaaime
http://twitter.com/geowolf
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___
Geoserver-users mailing list
Geoserver-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users