[Geoserver-users] Newbie: Need help trying to get geoserver data in Google Earth using kml_reflect

Hi,

This could be either a Geoserver issue or a Google Earth one, not sure where
to ask.

I've been following the article by Justin Lokitz to get Oracle spatial data
in Google Earth using Geoserver.
http://www.oracle.com/technology/pub/articles/lokitz-spatial-geoserver.html

Basic setup is very simple and works fine except for the last part where
Google Earth gives me an error message: No data received.

The network layer is defined as:
http://localhost:8080/geoserver/wms/kml_reflect?layers=COUNTIES

Geoserver returns a KML:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0&quot;&gt;
<Folder>
<NetworkLink>
<name>topp:COUNTIES</name>
<open>1</open>
<visibility>1</visibility>
<Url>
<href><![CDATA[http://localhost:8080/geoserver//wms?service=WMS&request=GetMap&format=application/vnd.google-earth.kmz+XML&width=1024&height=1024&srs=EPSG:4326&layers=topp:COUNTIES&styles=countypopdensity&KMScore=50&KMAttr=true&legend=false]]></href>
<viewRefreshMode>onStop</viewRefreshMode>
<viewRefreshTime>1</viewRefreshTime>
</Url>
</NetworkLink>
</Folder>
</kml>

When I call the URL
http://localhost:8080/geoserver//wms?service=WMS&request=GetMap&format=application/vnd.google-earth.kmz+XML&width=1024&height=1024&srs=EPSG:4326&layers=topp:COUNTIES&styles=countypopdensity&KMScore=50&KMAttr=true&legend=false
in a browser I get an error message: "null is not a valid pair of
coordinates". But my guess is that Google Earth should adds its own
coordinates.

If anyone got this example to work and has some ideas where to look for
further information please let me know.

Rene

--
View this message in context: http://www.nabble.com/Newbie%3A-Need-help-trying-to-get-geoserver-data-in-Google-Earth-using-kml_reflect-tf4259543.html#a12121768
Sent from the GeoServer - User mailing list archive at Nabble.com.

Renewest wrote:

Hi,

This could be either a Geoserver issue or a Google Earth one, not sure
where to ask.

I've been following the article by Justin Lokitz to get Oracle spatial
data in Google Earth using Geoserver.
http://www.oracle.com/technology/pub/articles/lokitz-spatial-geoserver.html

Basic setup is very simple and works fine except for the last part where
Google Earth gives me an error message: No data received.

The network layer is defined as:
http://localhost:8080/geoserver/wms/kml_reflect?layers=COUNTIES

Geoserver returns a KML:
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://earth.google.com/kml/2.0&quot;&gt;
<Folder>
<NetworkLink>
<name>topp:COUNTIES</name>
<open>1</open>
<visibility>1</visibility>
<Url>
<href><![CDATA[http://localhost:8080/geoserver//wms?service=WMS&request=GetMap&format=application/vnd.google-earth.kmz+XML&width=1024&height=1024&srs=EPSG:4326&layers=topp:COUNTIES&styles=countypopdensity&KMScore=50&KMAttr=true&legend=false]]></href>
<viewRefreshMode>onStop</viewRefreshMode>
<viewRefreshTime>1</viewRefreshTime>
</Url>
</NetworkLink>
</Folder>
</kml>

When I call the URL
http://localhost:8080/geoserver//wms?service=WMS&request=GetMap&format=application/vnd.google-earth.kmz+XML&width=1024&height=1024&srs=EPSG:4326&layers=topp:COUNTIES&styles=countypopdensity&KMScore=50&KMAttr=true&legend=false
in a browser I get an error message: "null is not a valid pair of
coordinates". But my guess is that Google Earth should adds its own
coordinates.

Some more info regarding this problem. In the geoserver window I find the
following:

552093 [INFO] org.vfny.geoserver.wms.requests.GetMapKvpReader - Set KMScore:
50
552093 [INFO] org.vfny.geoserver.servlets.AbstractService - handling
request:
GetMap Request
version: 1.1.1
output format: application/vnd.google-earth.kmz XML
width height: 1024,1024
bbox: Env[-123.5608136545028 : -114.6868370504584, 33.9173253458208 :
40.098192
88857897]
layers: topp:COUNTIES
styles: countypopdensity
552109 [INFO] org.vfny.geoserver.servlets.AbstractService - Stream abruptly
clos
ed by client, response aborted
552109 [INFO] org.vfny.geoserver.servlets.PartialBufferStrategy2 -
OutputStream
was successfully aborted.

Rene

--
View this message in context: http://www.nabble.com/Newbie%3A-Need-help-trying-to-get-geoserver-data-in-Google-Earth-using-kml_reflect-tf4259543.html#a12125686
Sent from the GeoServer - User mailing list archive at Nabble.com.

Renewest ha scritto:

Renewest wrote:

Hi,

This could be either a Geoserver issue or a Google Earth one, not sure
where to ask.

I've been following the article by Justin Lokitz to get Oracle spatial
data in Google Earth using Geoserver.
http://www.oracle.com/technology/pub/articles/lokitz-spatial-geoserver.html

Basic setup is very simple and works fine except for the last part where
Google Earth gives me an error message: No data received.

Hmmm... strange. Can you try out the GeoServer 1.5.2 release?
In the map preview page you'll find a KML link for each layer, and they
are all working for me... can you double check?

Cheers
Andrea

aaime wrote:

Hmmm... strange. Can you try out the GeoServer 1.5.2 release?
In the map preview page you'll find a KML link for each layer, and they
are all working for me... can you double check?

-

Andrea,

These preview KML links work fine. It's the Oracle layer that seems to be
the problem. I'm running 10.2.0.1 server and client. Will try 9.2 tomorrow.

Rene

--
View this message in context: http://www.nabble.com/Newbie%3A-Need-help-trying-to-get-geoserver-data-in-Google-Earth-using-kml_reflect-tf4259543.html#a12126167
Sent from the GeoServer - User mailing list archive at Nabble.com.

Renewest ha scritto:

aaime wrote:

Hmmm... strange. Can you try out the GeoServer 1.5.2 release?
In the map preview page you'll find a KML link for each layer, and they
are all working for me... can you double check?

-

Andrea,

These preview KML links work fine. It's the Oracle layer that seems to be
the problem. I'm running 10.2.0.1 server and client. Will try 9.2 tomorrow.

Wondering, does the OpenLayers preview work fine? If not, the trouble
has to be looked somewhere else than in the KML encoder (oh, make sure
the feature type is configured with a style that conforms to the geometry type in your column, or you may end up not seeing anything...
hey, this may be the cause of your problem indeed...).

Cheers
Andrea

Hi Rene,

When I call the URL
http://localhost:8080/geoserver//wms?service=WMS&request=GetMap&format=application/vnd.google-earth.kmz+XML&width=1024&height=1024&srs=EPSG:4326&layers=topp:COUNTIES&styles=countypopdensity&KMScore=50&KMAttr=true&legend=false
in a browser I get an error message: "null is not a valid pair of
coordinates". But my guess is that Google Earth should adds its own
coordinates.

Your getting this error because google earth appends its own bbox
parameter as you state. I suggest you append "bbox=-180,-90,180,90" to
the above request in the browser. That should give you the actual cause
of the problem. And if you could report that we can help.

Thanks,

-Justin

If anyone got this example to work and has some ideas where to look for
further information please let me know.

Rene

--
Justin Deoliveira
The Open Planning Project
http://topp.openplans.org

Continuum-3 wrote:

Your getting this error because google earth appends its own bbox
parameter as you state. I suggest you append "bbox=-180,-90,180,90" to
the above request in the browser. That should give you the actual cause
of the problem. And if you could report that we can help.

-Justin

Hi, I finally did get some results.

This one works
BBOX=4.304322035804176,51.918902528964,4.333716582778408,51.93508922878319

Then I zoomed in a bit more and it stopped working.
BBOX=4.308384829784615,51.92113952896748,4.329656295732704,51.93285309075169

Zooming back out again and it was alright again.

The logs don't seem to show anything usefull. Except for the "Stream
abruptly closed by client".

Rene

--
View this message in context: http://www.nabble.com/Newbie%3A-Need-help-trying-to-get-geoserver-data-in-Google-Earth-using-kml_reflect-tf4259543.html#a12176900
Sent from the GeoServer - User mailing list archive at Nabble.com.

Renewest ha scritto:

Continuum-3 wrote:

Your getting this error because google earth appends its own bbox
parameter as you state. I suggest you append "bbox=-180,-90,180,90" to
the above request in the browser. That should give you the actual cause
of the problem. And if you could report that we can help.

-Justin

Hi, I finally did get some results.

This one works
BBOX=4.304322035804176,51.918902528964,4.333716582778408,51.93508922878319

Then I zoomed in a bit more and it stopped working.
BBOX=4.308384829784615,51.92113952896748,4.329656295732704,51.93285309075169

Zooming back out again and it was alright again.

The logs don't seem to show anything usefull. Except for the "Stream
abruptly closed by client".

Rene,
there is a bug in the GeoServer reprojection code I've just spotted.
To make sure it's the same, you should go to the GeoServer configuration, Server panel, and set the logging to FINE, enable file logging, apply/save, reproduce the issue and the look in the log file
for a stack trace associated with the above error: I'd like to have
at look at that stack trace. If you can't spot the stack trace,
just send me the whole log by private mail.

Cheers
Andrea

aaime wrote:

there is a bug in the GeoServer reprojection code I've just spotted.
To make sure it's the same, you should go to the GeoServer
configuration, Server panel, and set the logging to FINE, enable file
logging, apply/save, reproduce the issue and the look in the log file
for a stack trace associated with the above error: I'd like to have
at look at that stack trace. If you can't spot the stack trace,
just send me the whole log by private mail.

Here is where things go wrong:

INFO: Stream abruptly closed by client, response aborted
Aug 16, 2007 10:39:15 AM org.vfny.geoserver.servlets.AbstractService
doService
FINE: Error writing out null
java.io.IOException
  at
org.vfny.geoserver.wms.responses.map.kml.KMZMapProducer.writeTo(KMZMapProducer.java:141)
  at
org.vfny.geoserver.wms.responses.GetMapResponse.writeTo(GetMapResponse.java:495)
  at
org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:592)
  at
org.vfny.geoserver.servlets.AbstractService.doGet(AbstractService.java:315)
  at org.geoserver.request.Dispatcher.dispatch(Dispatcher.java:192)
  at
org.geoserver.request.Dispatcher.handleRequestInternal(Dispatcher.java:52)
  at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
  at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
  at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
  at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
  at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
  at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1050)
  at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:103)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:354)
  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226)
  at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
  at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
  at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
  at org.mortbay.jetty.Server.handle(Server.java:269)
  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
  at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:687)
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:492)
  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:199)
  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:339)
  at
org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
  at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
Caused by: javax.xml.transform.TransformerException: Translator error
  at
org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:130)
  at
org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:105)
  at
org.vfny.geoserver.wms.responses.map.kml.KMZMapProducer.writeTo(KMZMapProducer.java:138)
  ... 31 more
Caused by: java.lang.IllegalArgumentException: ETYPE 1,005 must be expected
POLYGON or POLYGON_EXTERIOR (one of 3,1003,)
  at org.geotools.data.oracle.sdo.SDO.ensure(SDO.java:1936)
  at org.geotools.data.oracle.sdo.SDO.createPolygon(SDO.java:2509)
  at org.geotools.data.oracle.sdo.SDO.create(SDO.java:2322)
  at org.geotools.data.oracle.sdo.SDO.create(SDO.java:2289)
  at
org.geotools.data.oracle.sdo.GeometryConverter.asGeometry(GeometryConverter.java:123)
  at
org.geotools.data.oracle.attributeio.SDOAttributeIO.read(SDOAttributeIO.java:124)
  at org.geotools.data.jdbc.QueryData.read(QueryData.java:184)
  at
org.geotools.data.jdbc.JDBCFeatureReader.readFeature(JDBCFeatureReader.java:104)
  at org.geotools.data.jdbc.JDBCFeatureReader.next(JDBCFeatureReader.java:85)
  at
org.geotools.data.crs.ReprojectFeatureReader.next(ReprojectFeatureReader.java:149)
  at
org.geotools.data.store.FeatureReaderIterator.next(FeatureReaderIterator.java:64)
  at
org.geotools.feature.collection.DelegateFeatureIterator.next(DelegateFeatureIterator.java:54)
  at
org.vfny.geoserver.wms.responses.map.kml.KMLVectorTransformer$KMLTranslator.encode(KMLVectorTransformer.java:252)
  at
org.vfny.geoserver.wms.responses.map.kml.KMLVectorTransformer$KMLTranslator.encode(KMLVectorTransformer.java:231)
  at
org.vfny.geoserver.wms.responses.map.kml.KMLTransformer$KMLTranslator.encodeVectorLayer(KMLTransformer.java:180)
  at
org.vfny.geoserver.wms.responses.map.kml.KMLTransformer$KMLTranslator.encode(KMLTransformer.java:116)
  at
org.geotools.xml.transform.TransformerBase$XMLReaderSupport.parse(TransformerBase.java:677)
  at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:452)
  at org.geoto

Rene
--
View this message in context: http://www.nabble.com/Newbie%3A-Need-help-trying-to-get-geoserver-data-in-Google-Earth-using-kml_reflect-tf4259543.html#a12177527
Sent from the GeoServer - User mailing list archive at Nabble.com.

Renewest ha scritto:

aaime wrote:

....

Caused by: java.lang.IllegalArgumentException: ETYPE 1,005 must be expected
POLYGON or POLYGON_EXTERIOR (one of 3,1003,)

Ah, here is the reason. Your data is of type "compound polygon" which is a mix of straight and curved lines. GeoServer geometric model, JTS, cannot handle curves, thus the (badly reported) error.

To solve this, you either have to find a way to straighten your data, or
hack the Oracle data store to load curved lines anyways, and approximate
them with a set of smaller straight lines.

Cheers
Andrea

aaime wrote:

Ah, here is the reason. Your data is of type "compound polygon" which is
a mix of straight and curved lines. GeoServer geometric model, JTS,
cannot handle curves, thus the (badly reported) error.

To solve this, you either have to find a way to straighten your data, or
hack the Oracle data store to load curved lines anyways, and approximate
them with a set of smaller straight lines.

Andrea,

I created another layer based on a table that has no polygons. This time the
log shows:

INFO: Stream abruptly closed by client, response aborted
Aug 16, 2007 11:36:34 AM org.vfny.geoserver.servlets.AbstractService
doService
FINE: Error writing out null
java.io.IOException
  at
org.vfny.geoserver.wms.responses.map.kml.KMZMapProducer.writeTo(KMZMapProducer.java:141)
  at
org.vfny.geoserver.wms.responses.GetMapResponse.writeTo(GetMapResponse.java:495)
  at
org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:592)
  at
org.vfny.geoserver.servlets.AbstractService.doGet(AbstractService.java:315)
  at org.geoserver.request.Dispatcher.dispatch(Dispatcher.java:192)
  at
org.geoserver.request.Dispatcher.handleRequestInternal(Dispatcher.java:52)
  at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
  at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
  at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
  at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
  at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
  at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1050)
  at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:103)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:354)
  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226)
  at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
  at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
  at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
  at org.mortbay.jetty.Server.handle(Server.java:269)
  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
  at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:687)
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:492)
  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:199)
  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:339)
  at
org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
  at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
Caused by: javax.xml.transform.TransformerException: Translator error
  at
org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:130)
  at
org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:105)
  at
org.vfny.geoserver.wms.responses.map.kml.KMZMapProducer.writeTo(KMZMapProducer.java:138)
  ... 31 more
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException:
CoordinateSystem GEOGCS["WGS 84",
  DATUM["World Geodetic System 1984",
    SPHEROID["WGS 84", 6378137.0, 298.25722356

How should I interpret this?
Rene

--
View this message in context: http://www.nabble.com/Newbie%3A-Need-help-trying-to-get-geoserver-data-in-Google-Earth-using-kml_reflect-tf4259543.html#a12178258
Sent from the GeoServer - User mailing list archive at Nabble.com.

Renewest ha scritto:

aaime wrote:

Ah, here is the reason. Your data is of type "compound polygon" which is a mix of straight and curved lines. GeoServer geometric model, JTS, cannot handle curves, thus the (badly reported) error.

To solve this, you either have to find a way to straighten your data, or
hack the Oracle data store to load curved lines anyways, and approximate
them with a set of smaller straight lines.

Andrea,

I created another layer based on a table that has no polygons. This time the
log shows:

...

How should I interpret this?

This is the error I was expecting when I asked you to give me the stack trace, and that I corrected this morning.
Please download the "latest" nightly from http://geo.openplans.org/nightly/1.5.x/, it should be fixed there.

Cheers
Andrea

aaime wrote:

This is the error I was expecting when I asked you to give me the stack
trace, and that I corrected this morning.
Please download the "latest" nightly from
http://geo.openplans.org/nightly/1.5.x/, it should be fixed there.

Hi, here is what I did:
I stopped geoserver.
Copied the contents of the .zip over existing installation.
Restarted the server and had to redefine my datastore and server log
settings.

Resulting error:
INFO: Stream abruptly closed by client, response aborted
Aug 16, 2007 12:24:28 PM org.vfny.geoserver.servlets.AbstractService
doService
FINE: Error writing out null
java.io.IOException
  at
org.vfny.geoserver.wms.responses.map.kml.KMZMapProducer.writeTo(KMZMapProducer.java:141)
  at
org.vfny.geoserver.wms.responses.GetMapResponse.writeTo(GetMapResponse.java:495)
  at
org.vfny.geoserver.servlets.AbstractService.doService(AbstractService.java:592)
  at
org.vfny.geoserver.servlets.AbstractService.doGet(AbstractService.java:315)
  at org.geoserver.request.Dispatcher.dispatch(Dispatcher.java:192)
  at
org.geoserver.request.Dispatcher.handleRequestInternal(Dispatcher.java:52)
  at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:139)
  at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:44)
  at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:684)
  at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:625)
  at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:392)
  at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:347)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
  at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
  at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:445)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1050)
  at
org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:103)
  at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
  at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:354)
  at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226)
  at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
  at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
  at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
  at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
  at org.mortbay.jetty.Server.handle(Server.java:269)
  at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
  at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:687)
  at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:492)
  at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:199)
  at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:339)
  at
org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
  at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
Caused by: javax.xml.transform.TransformerException: Translator error
  at
org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:130)
  at
org.geotools.xml.transform.TransformerBase.transform(TransformerBase.java:105)
  at
org.vfny.geoserver.wms.responses.map.kml.KMZMapProducer.writeTo(KMZMapProducer.java:138)
  ... 31 more
Caused by: java.lang.RuntimeException: java.lang.IllegalArgumentException:
CoordinateSystem GEOGCS["WGS 84",
  DATUM["World Geodetic System 1984",
    SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]],
    AUTHORITY["EPSG","6326"]],
  PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]],
  UNIT["degree", 0.017453292519943295],
  AXIS["Geodetic longitude", EAST],
  AXIS["Geodetic latitude", NORTH],
  AUTHORITY["EPSG","4326"]] already used (check before using wrapper)
  at
org.vfny.geoserver.wms.responses.map.kml.KMLTransformer$KMLTranslator.encodeVectorLayer(KMLTransformer.java:152)
  at
org.vfny.geoserver.wms.responses.map.kml.KMLTransformer$KMLTranslator.encode(KMLTransformer.java:116)
  at
org.geotools.xml.transform.TransformerBase$XMLReaderSupport.parse(TransformerBase.java:677)
  at
org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:452)
  at
org.geotools.xml.transform.TransformerBase$Task.run(TransformerBase.java:293)
  at org.geotools.xml.transform.TransformerB

cheers, Rene
--
View this message in context: http://www.nabble.com/Newbie%3A-Need-help-trying-to-get-geoserver-data-in-Google-Earth-using-kml_reflect-tf4259543.html#a12178849
Sent from the GeoServer - User mailing list archive at Nabble.com.

Renewest ha scritto:

aaime wrote:

This is the error I was expecting when I asked you to give me the stack trace, and that I corrected this morning.
Please download the "latest" nightly from http://geo.openplans.org/nightly/1.5.x/, it should be fixed there.

Hi, here is what I did:
I stopped geoserver. Copied the contents of the .zip over existing installation.
Restarted the server and had to redefine my datastore and server log
settings.

Resulting error:
INFO: Stream abruptly closed by client, response aborted
Aug 16, 2007 12:24:28 PM org.vfny.geoserver.servlets.AbstractService
doService
FINE: Error writing out null

...
This is strange... yet I won't advise to use the above upgrade procedure.
Just to be sure, you did download http://geo.openplans.org/nightly/1.5.x/geoserver-1.5.x-latest-bin.zip
right?

Try unzipping the zip, get into the bin directory, double
click start.bat, configure the datastore and try again...
Oh, if you want to avoid reconfiguring everything, just overwrite
the "data_dir" with the one you already configured.

Cheers
Andrea

Hey. Currently we use OpenLayers with Geoserver. When we do a get feature info the information is returned in the following:
Results for FeatureType 'ptrs_Indicator1': -------------------------------------------- the_geom = [GEOMETRY (MultiPolygon) with 492 points] country_id = 29 country_name = Brazil dept_id = 70500 reg_code = null status_color = null category_caption = null category_id = null --------------------------------------------

We want to get it in a different format for obvious reasons. Can anyone help in telling me which file I'd need to edit to return it in JSON format for instance

Hey. Currently we use OpenLayers with Geoserver. When we do a get feature info the information is returned in the following:
Results for FeatureType 'ptrs_Indicator1': -------------------------------------------- the_geom = [GEOMETRY (MultiPolygon) with 492 points] country_id = 29 country_name = Brazil dept_id = 70500 reg_code = null status_color = null category_caption = null category_id = null --------------------------------------------

We want to get it in a different format for obvious reasons. Can anyone help in telling me which file I'd need to edit to return it in JSON format for instance

Ali Khan ha scritto:

Hey. Currently we use OpenLayers with Geoserver. When we do a get feature info the information is returned in the following:
Results for FeatureType 'ptrs_Indicator1': -------------------------------------------- the_geom = [GEOMETRY (MultiPolygon) with 492 points] country_id = 29 country_name = Brazil dept_id = 70500 reg_code = null status_color = null category_caption = null category_id = null --------------------------------------------

We want to get it in a different format for obvious reasons. Can anyone help in telling me which file I'd need to edit to return it in JSON format for instance

No file. There is no way to get a JSON output from GetFeatureInfo at
the moment. The supported formats are GML2, text and html (the latter
can be customized using freemarker templates).

We'll have GeoJSON integrated in the trunk nightlies any day now,
but it will be integrated only in the WFS GetFeature output.
Anyways, building a GetFeature that does basically what a GetFeatureInfo
does should not be complex provided reprojection is not in the mix.

If you need it for GetFeatureInfo I warmly suggest you open a Jira
issue requesting it for Geoserver 1.6.0, it should not be too
complicated to implement.

Cheers
Andrea

Thanks for the quick reply. For the freemarker templates what are these exactly and where can I get more information on them?

Andrea Aime wrote:

Ali Khan ha scritto:

Hey. Currently we use OpenLayers with Geoserver. When we do a get feature info the information is returned in the following:
Results for FeatureType 'ptrs_Indicator1': -------------------------------------------- the_geom = [GEOMETRY (MultiPolygon) with 492 points] country_id = 29 country_name = Brazil dept_id = 70500 reg_code = null status_color = null category_caption = null category_id = null --------------------------------------------

We want to get it in a different format for obvious reasons. Can anyone help in telling me which file I'd need to edit to return it in JSON format for instance

No file. There is no way to get a JSON output from GetFeatureInfo at
the moment. The supported formats are GML2, text and html (the latter
can be customized using freemarker templates).

We'll have GeoJSON integrated in the trunk nightlies any day now,
but it will be integrated only in the WFS GetFeature output.
Anyways, building a GetFeature that does basically what a GetFeatureInfo
does should not be complex provided reprojection is not in the mix.

If you need it for GetFeatureInfo I warmly suggest you open a Jira
issue requesting it for Geoserver 1.6.0, it should not be too
complicated to implement.

Cheers
Andrea

Found some sample .ftls in the states folder and made my own one but what exactly do you need to do to tell the WMS query to use that specific template? do i simply add &template=TEMPLATE_NAME ?

Andrea Aime wrote:

Ali Khan ha scritto:

Hey. Currently we use OpenLayers with Geoserver. When we do a get feature info the information is returned in the following:
Results for FeatureType 'ptrs_Indicator1': -------------------------------------------- the_geom = [GEOMETRY (MultiPolygon) with 492 points] country_id = 29 country_name = Brazil dept_id = 70500 reg_code = null status_color = null category_caption = null category_id = null --------------------------------------------

We want to get it in a different format for obvious reasons. Can anyone help in telling me which file I'd need to edit to return it in JSON format for instance

No file. There is no way to get a JSON output from GetFeatureInfo at
the moment. The supported formats are GML2, text and html (the latter
can be customized using freemarker templates).

We'll have GeoJSON integrated in the trunk nightlies any day now,
but it will be integrated only in the WFS GetFeature output.
Anyways, building a GetFeature that does basically what a GetFeatureInfo
does should not be complex provided reprojection is not in the mix.

If you need it for GetFeatureInfo I warmly suggest you open a Jira
issue requesting it for Geoserver 1.6.0, it should not be too
complicated to implement.

Cheers
Andrea

Ali Khan ha scritto:

Found some sample .ftls in the states folder and made my own one but what exactly do you need to do to tell the WMS query to use that specific template? do i simply add &template=TEMPLATE_NAME ?

No, the tutorial is here:
http://docs.codehaus.org/display/GEOSDOC/GetFeatureInfo+templates

Cheers
Andrea