[postgis-users] Postgis 2.0 and geoserver 2.1 rc4

2011-04-18 Thread 龙龙
Hi, I am getting the following error when trying to add a layer from a postgis 
2.0 database:
 java.lang.RuntimeException: java.io.IOException: Error occured calculating 
bounds at 
org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.java:476)
 at 
org.geotools.jdbc.JDBCFeatureStore.getBoundsInternal(JDBCFeatureStore.java:178) 
at 
org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSource.java:369)
 at 
org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSource.java:341)
 at 
org.geotools.data.SimpleFeatureSourceBridge.getBounds(SimpleFeatureSourceBridge.java:49)
 at 
org.vfny.geoserver.global.GeoServerFeatureSource.getBounds(GeoServerFeatureSource.java:529)
 at 
org.geoserver.catalog.CatalogBuilder.getNativeBounds(CatalogBuilder.java:463) 
at 
org.geoserver.web.data.resource.BasicResourceConfig$1.onSubmit(BasicResourceConfig.java:115)
 at 
org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubmitLink.java:68)
 at 
org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitBehavior.java:143)
 at 
org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:177) at 
org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:300)
 at 
org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:119)
 at 
org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:92)
 at 
org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1250) 
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at 
org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) at 
org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at 
org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484) at 
org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:160) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at 
javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at 
org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:158)
 at 
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
 at 
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
 at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
 at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
 at 

 
But this problem doesn't exist when I use postgis 1.5. So, is this a postgis 
problem or a geoserver problem. How shall I deal with it?___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] Postgis 2.0 and geoserver 2.1 rc4

2011-04-18 Thread Maria Arias de Reyna
El Monday 18 April 2011, 龙龙 escribió:
 Hi, I am getting the following error when trying to add a layer from a
 postgis 2.0 database: java.lang.RuntimeException: java.io.IOException:
 Error occured calculating bounds at
 org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.ja
 va:476) at
 org.geotools.jdbc.JDBCFeatureStore.getBoundsInternal(JDBCFeatureStore.java
 :178) at
 org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSourc
 e.java:369) at
 org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSourc
 e.java:341) at
 org.geotools.data.SimpleFeatureSourceBridge.getBounds(SimpleFeatureSourceB
 ridge.java:49) at
 org.vfny.geoserver.global.GeoServerFeatureSource.getBounds(GeoServerFeatur
 eSource.java:529) at
 org.geoserver.catalog.CatalogBuilder.getNativeBounds(CatalogBuilder.java:4
 63) at
 org.geoserver.web.data.resource.BasicResourceConfig$1.onSubmit(BasicResour
 ceConfig.java:115) at
 org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubm
 itLink.java:68) at
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitB
 ehavior.java:143) at
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:17
 7) at
 org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefau
 ltAjaxBehavior.java:300) at
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.
 processEvents(BehaviorRequestTarget.java:119) at
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(Abst
 ractRequestCycleProcessor.java:92) at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1
 250) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at
 org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) at
 org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
 at
 org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:16
 0) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at
 org.springframework.web.servlet.mvc.ServletWrappingController.handleReques
 tInternal(ServletWrappingController.java:158) at
 org.springframework.web.servlet.mvc.AbstractController.handleRequest(Abstr
 actController.java:153) at
 org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(
 SimpleControllerHandlerAdapter.java:48) at
 org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherSer
 vlet.java:875) at
 org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServ
 let.java:809) at 
 
 But this problem doesn't exist when I use postgis 1.5. So, is this a
 postgis problem or a geoserver problem. How shall I deal with it?


The data from the table is the same? 

I had this error once when the geometry column wasn't correctly defined. Are 
you sure the table is defined on the geometry_columns table?

Can you look inside geoserver to see which is the exact sql sentence that is 
used there?

-- 
María Arias de Reyna Domínguez
Área de Operaciones

Emergya Consultoría 
Tfno: +34 954 51 75 77 / +34 607 43 74 27
Fax: +34 954 51 64 73 
www.emergya.es 
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] 回复: Postgis 2.0 and geoserver 2.1 rc4

2011-04-18 Thread 龙龙
Thanks for your kind-hearted answer. The data from the table is the same.
There is a sample data in geoserver's user documentation named 
nyc_buildings.sql.
When we use PostgreSQL9.0、postgis 1.5 and geoserver 2.1 rc4 to publish this 
data, everything goes all right.
But when we change postgis1.5 to postgis2.0, the problem comes
There are two bouding boxes to fill. When we clicked Compute from data or 
Compute from Native bounds, the error happened...
 
Someone says that postgis API has changed in 2.0 for bounding boxes. So the 
error happens. Do you agree with him? And if it is true, does it mean that we 
can't use postgis2.0 to publish the layer or there is a need of other tools to 
solve it? I'm looking forword to your reply. Thank you very much.

   
  
  -- 原始邮件 --
  发件人: Maria Arias de Reynamar...@emergya.es;
 发送时间: 2011年4月18日(星期一) 下午3:18
 收件人: PostGIS Users Discussionpostgis-users@postgis.refractions.net; 
 
 主题: Re: [postgis-users] Postgis 2.0 and geoserver 2.1 rc4

  
El Monday 18 April 2011, 龙龙 escribió:
 Hi, I am getting the following error when trying to add a layer from a
 postgis 2.0 database: java.lang.RuntimeException: java.io.IOException:
 Error occured calculating bounds at
 org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.ja
 va:476) at
 org.geotools.jdbc.JDBCFeatureStore.getBoundsInternal(JDBCFeatureStore.java
 :178) at
 org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSourc
 e.java:369) at
 org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSourc
 e.java:341) at
 org.geotools.data.SimpleFeatureSourceBridge.getBounds(SimpleFeatureSourceB
 ridge.java:49) at
 org.vfny.geoserver.global.GeoServerFeatureSource.getBounds(GeoServerFeatur
 eSource.java:529) at
 org.geoserver.catalog.CatalogBuilder.getNativeBounds(CatalogBuilder.java:4
 63) at
 org.geoserver.web.data.resource.BasicResourceConfig$1.onSubmit(BasicResour
 ceConfig.java:115) at
 org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubm
 itLink.java:68) at
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitB
 ehavior.java:143) at
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:17
 7) at
 org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefau
 ltAjaxBehavior.java:300) at
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.
 processEvents(BehaviorRequestTarget.java:119) at
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(Abst
 ractRequestCycleProcessor.java:92) at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1
 250) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at
 org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) at
 org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
 at
 org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:16
 0) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at
 org.springframework.web.servlet.mvc.ServletWrappingController.handleReques
 tInternal(ServletWrappingController.java:158) at
 org.springframework.web.servlet.mvc.AbstractController.handleRequest(Abstr
 actController.java:153) at
 org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(
 SimpleControllerHandlerAdapter.java:48) at
 org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherSer
 vlet.java:875) at
 org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServ
 let.java:809) at 
 
 But this problem doesn't exist when I use postgis 1.5. So, is this a
 postgis problem or a geoserver problem. How shall I deal with it?


The data from the table is the same? 

I had this error once when the geometry column wasn't correctly defined. Are 
you sure the table is defined on the geometry_columns table?

Can you look inside geoserver to see which is the exact sql sentence that is 
used there?

-- 
María Arias de Reyna Domínguez
�rea de Operaciones

Emergya Consultoría 
Tfno: +34 954 51 75 77 / +34 607 43 74 27
Fax: +34 954 51 64 73 
www.emergya.es 
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


[postgis-users] ST_Intersects on geography

2011-04-18 Thread Kidd, David M
Hi,

Applogies if the is a stupid newbie question.

I have am writing some some simple point in polygon searches on geographic data 
using ST_Intersects, but have been getting some unexpected results;

Searching for a point in the southern hemisphere:

SELECT ST_Intersects('POINT(-160 -43)'::geography, 'POLYGON((-180 -90, -180 0, 
180 0, 180 -90, -180 -90))'::geography)

Returns f

Searching for a point in the northern hemisphere:

SELECT ST_Intersects('POINT(160 43)'::geography, 'POLYGON((0 0, 0 90, 180 90, 
180 0, 0 0))'::geography)

ERROR:  BOOM! Could not generate outside point!
CONTEXT:  SQL function st_intersects statement 1

** Error **

ERROR: BOOM! Could not generate outside point!
SQL state: XX000
Context: SQL function st_intersects statement 1
This works though






David M. Kidd

Research Associate
Center for Population Biology
Silwood Park Campus
Imperial College London
0207 594 2470


___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users


Re: [postgis-users] ??: Postgis 2.0 and geoserver 2.1 rc4

2011-04-18 Thread Paragon Corporation
I suspect this is my fault since I cleared out most of the deprecated functions 
in this ticket:
http://trac.osgeo.org/postgis/ticket/737
 
and evidentally geoserver is still using some.
 
I'm guessing it is the removal of st_box2d that is posing a problem but can't 
be sure: try installing this function to see if it solves your problem:
 
 CREATE OR REPLACE FUNCTION st_box2d(geometry)
 RETURNS box2d
 AS '$libdir/postgis-2.0','LWGEOM_to_BOX2DFLOAT4'
 LANGUAGE 'C' IMMUTABLE STRICT;
 
(Note this function in its current form may change before release).
 
If that doesn't fix it, it would be great if you look in your postgresql/pg_log 
folder at the last log file.  It should show the sql error it is trying to run 
that is failing.
 
There is a legacy.sql file that also gets copied during install for people that 
need to run with old installs of applications that use removed functions.  This 
I'm testing right now to get rid of the remaining install bugs in it and to add 
a regress test for it.
 
Hope that helps,
Regina
http://www.postgis.us
 

  _  

From: postgis-users-boun...@postgis.refractions.net 
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of ??
Sent: Monday, April 18, 2011 8:06 AM
To: PostGIS Users Discussion
Subject: [postgis-users] ??: Postgis 2.0 and geoserver 2.1 rc4


Thanks for your kind-hearted answer. The data from the table is the same.
There is a sample data in geoserver's user documentation named 
nyc_buildings.sql.
When we use PostgreSQL9.0、postgis 1.5 and geoserver 2.1 rc4 to publish this 
data, everything goes all right.
But when we change postgis1.5 to postgis2.0, the problem comes
There are two bouding boxes to fill. When we clicked Compute from data or 
Compute from Native bounds, the error happened...

Someone says that postgis API has changed in 2.0 for bounding boxes. So the 
error happens. Do you agree with him? And if it is true, does it mean that we 
can't use postgis2.0 to publish the layer or there is a need of other tools to 
solve it? I'm looking forword to your reply. Thank you very much.

 
 
-- 原始邮件 --
发件人: Maria Arias de Reynamar...@emergya.es;
发送时间: 2011年4月18日(星期一) 下午3:18
收件人: PostGIS Users Discussionpostgis-users@postgis.refractions.net; 
主题: Re: [postgis-users] Postgis 2.0 and geoserver 2.1 rc4
 
El Monday 18 April 2011, 龙龙 escribió:
 Hi, I am getting the following error when trying to add a layer from a
 postgis 2.0 database: java.lang.RuntimeException: java.io.IOException:
 Error occured calculating bounds at
 org.geotools.jdbc.JDBCFeatureSource.getBoundsInternal(JDBCFeatureSource.ja
 va:476) at
 org.geotools.jdbc.JDBCFeatureStore.getBoundsInternal(JDBCFeatureStore.java
 :178) at
 org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSourc
 e.java:369) at
 org.geotools.data.store.ContentFeatureSource.getBounds(ContentFeatureSourc
 e.java:341) at
 org.geotools.data.SimpleFeatureSourceBridge.getBounds(SimpleFeatureSourceB
 ridge.java:49) at
 org.vfny.geoserver.global.GeoServerFeatureSource.getBounds(GeoServerFeatur
 eSource.java:529) at
 org.geoserver.catalog.CatalogBuilder.getNativeBounds(CatalogBuilder.java:4
 63) at
 org.geoserver.web.data.resource.BasicResourceConfig$1.onSubmit(BasicResour
 ceConfig.java:115) at
 org.apache.wicket.ajax.markup.html.form.AjaxSubmitLink$1.onSubmit(AjaxSubm
 itLink.java:68) at
 org.apache.wicket.ajax.form.AjaxFormSubmitBehavior.onEvent(AjaxFormSubmitB
 ehavior.java:143) at
 org.apache.wicket.ajax.AjaxEventBehavior.respond(AjaxEventBehavior.java:17
 7) at
 org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefau
 ltAjaxBehavior.java:300) at
 org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.
 processEvents(BehaviorRequestTarget.java:119) at
 org.apache.wicket.request.AbstractRequestCycleProcessor.processEvents(Abst
 ractRequestCycleProcessor.java:92) at
 org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1
 250) at org.apache.wicket.RequestCycle.step(RequestCycle.java:1329) at
 org.apache.wicket.RequestCycle.steps(RequestCycle.java:1436) at
 org.apache.wicket.RequestCycle.request(RequestCycle.java:545) at
 org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:484)
 at
 org.apache.wicket.protocol.http.WicketServlet.doPost(WicketServlet.java:16
 0) at javax.servlet.http.HttpServlet.service(HttpServlet.java:727) at
 javax.servlet.http.HttpServlet.service(HttpServlet.java:820) at
 org.springframework.web.servlet.mvc.ServletWrappingController.handleReques
 tInternal(ServletWrappingController.java:158) at
 org.springframework.web.servlet.mvc.AbstractController.handleRequest(Abstr
 actController.java:153) at
 org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(
 SimpleControllerHandlerAdapter.java:48) at
 org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherSer
 vlet.java:875) at
 

Re: [postgis-users] ST_Intersects on geography

2011-04-18 Thread Paragon Corporation
Hmm I didn't realize we use BOOM! in our errors, but I guess we do since I
get the same message in 2.0 and 1.5. :)
 
I know there are issues with the outer fringes when you get into the -180
... area which we have bug tickets in place for and patches not yet applied.
That could be one of them
try moving in a bit like 179.5 89 etc.
 
Unfortunately the guy who deals with these things is incognito at the moment

  _  

From: postgis-users-boun...@postgis.refractions.net
[mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Kidd,
David M
Sent: Monday, April 18, 2011 10:25 AM
To: postgis-users@postgis.refractions.net
Subject: [postgis-users] ST_Intersects on geography


Hi,
 
Applogies if the is a stupid newbie question.
 
I have am writing some some simple point in polygon searches on geographic
data using ST_Intersects, but have been getting some unexpected results;
 
Searching for a point in the southern hemisphere:
 
SELECT ST_Intersects('POINT(-160 -43)'::geography, 'POLYGON((-180 -90, -180
0, 180 0, 180 -90, -180 -90))'::geography) 
 
Returns f
 
Searching for a point in the northern hemisphere:
 
SELECT ST_Intersects('POINT(160 43)'::geography, 'POLYGON((0 0, 0 90, 180
90, 180 0, 0 0))'::geography)
 
ERROR:  BOOM! Could not generate outside point!
CONTEXT:  SQL function st_intersects statement 1
 
** Error **
 
ERROR: BOOM! Could not generate outside point!
SQL state: XX000
Context: SQL function st_intersects statement 1
This works though 
 
 
 
 
 

David M. Kidd

Research Associate
Center for Population Biology
Silwood Park Campus
Imperial College London
0207 594 2470

 
___
postgis-users mailing list
postgis-users@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users