Feb 182015
 
  • FeatureRequest different from different Geoserver instances

    I have two instances of geoserver on different systems, with the same Data underlying. One is version 2.4.4, the other one 2.6.2.

    Both behave different when I make a Feature Request:

    the first one is giving me Bounding Box Data like this:

    <gml:boundedBy><gml:Envelope srsDimension="2" srsName="urn:ogc:def:crs:EPSG::31466">    
    <gml:lowerCorner>5770863.855 363273.177000001</gml:lowerCorner>
    <gml:upperCorner>5770864.5512810005 363274.2701699999</gml:upperCorner>      
    </gml:Envelope></gml:boundedBy>
    

    The second one provides location Data in a different way:

    <gml:Polygon ...>
      .....
      <gml:posList>
            5770863.855  xxx yyy 363273.177000001 5770864.5512810005 zzz qqq 63274.2701699999 rrr sss
      </gml:posList>   
     ....
    </gml:Polygon>
    

    I want to have it on both instances like in the first one, with the bounded Box.

  • get wms info with Leaflet

    I am trying to export(excel,xml or pdf formats) wms feature information using the next tools:

    1.- Geoserver.-Provides a Sql statement wich generates a wms polygon layer.

    2.- Postgis.-Provides the functions to Geoserver Sql.

    3.- Leaflet.-To show the results on a map viewer application.

    I have seen how to do something like that with Openlayer but i am developing with Leaflet and i don’t know if it is possible.

    To realize, the final objective is to export the information from a layer but the limit is another layer which is a polygon.

  • Data Migrating Issue from Geoserver 2.4.2 to 2.6.2

    I am trying to migrate a workspace from Geoserver 2.4.2 to 2.6.6. We started with migrating styles. The style is visible on the Geoserver, howver on opening it is giving the error shown below. Please can anyone help?

    org.apache.wicket.WicketRuntimeException: Can’t instantiate page using constructor public org.geoserver.wms.web.data.StyleEditPage(org.apache.wicket.PageParameters) and argument name = “[AGA RADAR]”
    at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:212)
    at org.apache.wicket.session.DefaultPageFactory.newPage(DefaultPageFactory.java:89)
    at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.newPage(BookmarkablePageRequestTarget.java:305)
    at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.getPage(BookmarkablePageRequestTarget.java:320)
    at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.processEvents(BookmarkablePageRequestTarget.java:234)
    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.doGet(WicketServlet.java:138)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)
    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:923)
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:620)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:75)
    at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:71)
    at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
    at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:46)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:50)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
    at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
    at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
    at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
    at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
    at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
    at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
    at org.geoserver.security.filter.GeoServerUserNamePasswordAuthenticationFilter.doFilter(GeoServerUserNamePasswordAuthenticationFilter.java:116)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
    at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
    at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
    at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
    at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:53)
    at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
    at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
    at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
    at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
    at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:135)
    at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
    at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:76)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:48)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:44)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:504)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1074)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
    at java.lang.Thread.run(Thread.java:745)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.apache.wicket.session.DefaultPageFactory.createPage(DefaultPageFactory.java:188)
    … 106 more
    Caused by: java.lang.NullPointerException
    at com.sun.proxy.$Proxy4.equals(Unknown Source)
    at org.geoserver.catalog.impl.DefaultCatalogFacade.getStyleByName(DefaultCatalogFacade.java:862)
    at org.geoserver.catalog.impl.CatalogImpl.getStyleByName(CatalogImpl.java:1302)
    at org.geoserver.catalog.impl.CatalogImpl.getStyleByName(CatalogImpl.java:1283)
    at org.geoserver.security.SecureCatalogImpl.getStyleByName(SecureCatalogImpl.java:1250)
    at org.geoserver.catalog.impl.AbstractFilteredCatalog.getStyleByName(AbstractFilteredCatalog.java:680)
    at org.geoserver.catalog.impl.AbstractCatalogDecorator.getStyleByName(AbstractCatalogDecorator.java:521)
    at org.geoserver.catalog.impl.LocalWorkspaceCatalog.getStyleByName(LocalWorkspaceCatalog.java:61)
    at org.geoserver.wms.web.data.StyleEditPage.(StyleEditPage.java:37)
    … 111 more

  • Developing Geoserver Extension

    I want to develop geoserver extension that intercepts wms request, checks specific url parameter, builds clusters of points and generate the response image with clusters.

    I’ve studied a little the geoserver code. And I’m planning now to replace “FeatureLayer” in “mapContent” by my class. The class replaces real points by clusters of points.

    The problem is I don’t know how to inject my extension code into wms processing.

  • Difference between GeoServer and OpenLayers

    I recently installed GeoServer and downloaded OpenLayers also. I am a bit lost about which one to use when it comes to add functionality in my web map.

    For example, I want to add layer switcher, shall I try to do it from GeoServer or through OpenLayers? Another example is opacity, shall I try to do it from GeoServer or through OpenLayers?

    Does GeoServer stop when layers are imported and displayed as WMS and then OpenLayers take full responsibility for Controls, opacity, thematic maps, base layer etc?

    Thank you

Digest powered by RSS Digest

 Posted by at 13:42
Feb 142015
 
  • WMSGetFeatureInfo with Geoserver HTTP Auth

    I’m using Geoserver and OpenLayers to call Geowebcache with WMS layers. My application and Geoserver are on different servers so I’m using OpenLayer.ProxyHost and a URL rewrite on the map server. We just added access rules to the layers with data security in Geoserver. I was able to get the layers to show up on the map by using this answer:

    http://stackoverflow.com/questions/10950747/authenticate-in-geoserver-with-asp-net-and-iis/13123640#13123640

    I can’t get the wmsgetfeatureinfo to work, though. Even after I ‘login’ to geoserver and that cookie gets set, it still won’t let me click. I think it might have something to do with the proxies and the authentication not getting passed all the way through. How do I fix this so I can click on the points again? Even if it’s not with wmsgetfeatureinfo?

  • Download zip from geoserver using javascript

    How can i download zip file, made by geoserver WFS request, implemented in javascript? i’m using OpenLayers.Request.POST to send request.

  • GeoServer Raster Data Sources: satellite data’s contrast issue

    I am trying to use my own satellite image as the basemap for a webapp, instead of OSM, Google etc imageries. In order to do that, I made a Raster Data Sources store inside my GeoServer, which is pointing towards a .tif file (having .prj and .tfw files along-with). I am on Ubuntu 14.04. Everything is working fine except the following issue.

    As can be seen in the attached images, visualization of satellite image in QGIS is giving a good contrast and brightness. But importing the very same image inside GeoServer is producing low contrast/bright image, plus seams, which can be seen at the bottom section. Although I am using Tiling:Tiled in the GeoServer, it shouldn’t create seams. Zoomin and out are also changing the contrast and brightness of the GeoServer image.

    QGIS image

    GeoServer image

    Kindly explain the reason and remedy of this unexpected effect.

Digest powered by RSS Digest

 Posted by at 13:36
Feb 132015
 
  • BoundingBox of Layer seems to be unnaturally large

    I retrieve the bbox of my main Layer via GetCapabilities.

    Now, if I instantiate my map like this, I would expect to have the map centered within the bbox.

    map = new OpenLayers.Map({
        div : "map",
        projection :  new OpenLayers.Projection("EPSG:31466");
        units : "m",
        maxResolution : 2,
        maxExtent : new OpenLayers.Bounds(bbox)
    });
    

    However, when I do it like this, the map is displayed in the upper right corner.
    Even stranger, when I put markers on the edges of the bounding box, the upper right corner is very far away and the lower left is not visible at all. (See picture, the red markers are the markers on the edge of a hard-coded bounding box that I use and that I want to replace by a Server-generated Version, the green marker is the upper right of my layers bounding box according to GetCapabilities).

    enter image description here

    EDIT:

    The bounding box that getCapabilties sends:
    [360000, 5770215.8928236235, 365000, 5770804.068148668]

    The bounding box that is hard-coded (red markers): [363060,5770362,363496,5771118]

  • Bounding Box Coordinates are given in different Projection – how do I find out which

    All the layers in my application are EPSG:31466. However, if I retrieve the capabilites:

            var wms = new OpenLayers.Format.WMSCapabilities();
    
            OpenLayers.Request.GET({
                url: myUrl,
                success: function(e){
    
                    var response = wms.read(e.responseText);
                    var layerObj = response.capability.layers[0];  
                    console.log(layerObj.llbbox);
    
                }
            }
    

    The BoundingBox’ Coordinates are given in a totally different format.

    In EPSG:31466 I would expect them to be similar to new OpenLayers.Bounds(363060,5770362,363496,5771118), but in fact they are like this: [-23.015284514192917, 48.276782941782315, -22.953739137948624, 48.29765968309495].

    Looks like a different format, but why and how do I change this?


        console.log(layerObj.llbbox);
        var my_extent=new OpenLayers.Bounds(layerObj.llbbox).transform(new OpenLayers.Projection("EPSG:4326"),map.displayProjection);
        console.log(my_extent);
    

    Console Output:

     [-23.015284514192917, 48.276782941782315, -22.953739137948624, 48.29765968309495]
    
    Object { left=-23.015284514193, bottom=48.276782941782, right=-22.953739137949, more...}
    
  • Geoserver with Amazon s3 bucket

    I have Apache running Geoserver on my virtual instance, and I am wondering whether the Geoserver data directory can point to an Amazon S3 bucket. Is this possible? How does this affect performance?

    If S3 is a poor setup for Geoserver’s data directory, are there any suggestions for adding large amounts of data to my Geoserver data directory? The data directory may reach up to 100’s of GB’s, possibly more. Should I just get a server with a large hard drive, or connect to a more scalable solution, like an Amazon S3 bucket?

  • Geoserver WMS defaults to Mollweide projection in QGIS

    We have a WMS on Geoserver (version 2.6.1) which we are using to view in QGIS. For some reason when importing to QGIS it defaults to World Mollweide (EPSG:54009). The process is as follows:

    Add connection:

    Add WMS connection to QGIS

    With the path http://www.ga.gov.au/geophysics-rockpropertypub-gws/ga_rock_properties_wms/ows

    WMS Connection Settings

    This gives us all our WMS Layers:

    QGIS Browser with WMS Layers

    And if we add a couple:

    Legend with gamma short spaced density and dry bulk density

    We get a strange projection for the project:

    Project coordinate system

    If we look at the properties of the gamma short spaced density layer

    Layer properties of gamma short spaced density

    It too has defaulted to World Mollweide. The layer source string is as follows:

    crs=EPSG:54009&dpiMode=7&format=image/png&layers=gamma_short_spaced_density&styles=&url=http://www.ga.gov.au/geophysics-rockpropertypub-gws/ga_rock_properties_wms/ows

    So what is the reason for this? We want the default to be EPSG:4326 at the minimum, although we would prefer EPSG:4283. How can we fix this? Is it a problem with QGIS or the WMS?

  • Geoserver sometimes does not load all selected layers

    I have geoserver serving two layers from postgis into a leaflet application. Leaflet is requesting GeoJSON from geoserver which are displayed one a time using Leaflet’s layer control. The issue here is that sometimes both layers can be loaded just fine, but sometimes only one layer gets through the request. Investigating Geoserver’s console output I noticed that when the page is loaded geoserver has to encode the layers, and when geoserver encode the two everything works fine.

    here is an example of when everything works:

    12 Feb 14:04:20 INFO [geoserver.wfs] -
    Request: getServiceInfo
    12 Feb 14:04:20 INFO [geoserver.wfs] -
    Request: getServiceInfo
    12 Feb 14:04:20 INFO [geoserver.wfs] -
    Request: getFeature
      service = WFS
      version = 2.0.0
      baseUrl = http://localhost:8080/geoserver/
      outputFormat = text/javascript
      resolve = none
      resolveDepth = *
      resolveTimeout = 300
      resultType = results
      formatOptions = {CALLBACK=getJson}
      abstractQueryExpressionGroup[0] = wfs:abstractQueryExpression=net.opengis.wf
      s20.impl.QueryTypeImpl@12bfcddc (handle: null) (abstractProjectionClause: null,
      abstractSelectionClause: null, abstractSortingClause: null, aliases: null, typeN
      ames: [{PastDenver}dataset1]) (featureVersion: null, srsName: null, filter: null
      , propertyNames: null, sortBy: null)
      abstractQueryExpression[0]:
        typeNames[0] = {PastDenver}dataset1
    12 Feb 14:04:20 INFO [geoserver.wfs] -
      Request: getFeature
      service = WFS
      version = 2.0.0
      baseUrl = http://localhost:8080/geoserver/
      outputFormat = text/javascript
      resolve = none
      resolveDepth = *
      resolveTimeout = 300
      resultType = results
      formatOptions = {CALLBACK=getJson}
      abstractQueryExpressionGroup[0] = wfs:abstractQueryExpression=net.opengis.wf
      s20.impl.QueryTypeImpl@7393ff25 (handle: null) (abstractProjectionClause: null,
      abstractSelectionClause: null, abstractSortingClause: null, aliases: null, typeN
      ames: [{PastDenver}dataset2]) (featureVersion: null, srsName: null, filter: null
      , propertyNames: null, sortBy: null)
      abstractQueryExpression[0]:
        typeNames[0] = {PastDenver}dataset2
    12 Feb 14:04:20 INFO [wfs.json] - about to encode JSON
    12 Feb 14:04:20 INFO [wfs.json] - about to encode JSON
    

    An here an example when the error occurs:

    12 Feb 14:04:19 INFO [geoserver.wfs] -
    Request: getServiceInfo
    12 Feb 14:04:19 INFO [geoserver.wfs] -
    Request: getServiceInfo
    12 Feb 14:04:19 INFO [geoserver.wfs] -
      Request: getFeature
      service = WFS
      version = 2.0.0
      baseUrl = http://localhost:8080/geoserver/
      outputFormat = text/javascript
      resolve = none
      resolveDepth = *
      resolveTimeout = 300
      resultType = results
      formatOptions = {CALLBACK=getJson}
      abstractQueryExpressionGroup[0] = wfs:abstractQueryExpression=net.opengis.wf
      s20.impl.QueryTypeImpl@61c59109 (handle: null) (abstractProjectionClause: null,
      abstractSelectionClause: null, abstractSortingClause: null, aliases: null, typeN
      ames: [{PastDenver}dataset1]) (featureVersion: null, srsName: null, filter: null
      , propertyNames: null, sortBy: null)
      abstractQueryExpression[0]:
        typeNames[0] = {PastDenver}dataset1
    12 Feb 14:04:19 INFO [wfs.json] - about to encode JSON
    12 Feb 14:04:19 INFO [geoserver.wfs] -
      Request: getFeature
      service = WFS
      version = 2.0.0
      baseUrl = http://localhost:8080/geoserver/
      outputFormat = text/javascript
      resolve = none
      resolveDepth = *
      resolveTimeout = 300
      resultType = results
      formatOptions = {CALLBACK=getJson}
      abstractQueryExpressionGroup[0] = wfs:abstractQueryExpression=net.opengis.wf
      s20.impl.QueryTypeImpl@283be8ee (handle: null) (abstractProjectionClause: null,
      abstractSelectionClause: null, abstractSortingClause: null, aliases: null, typeN
      ames: [{PastDenver}dataset2]) (featureVersion: null, srsName: null, filter: null
      , propertyNames: null, sortBy: null)
      abstractQueryExpression[0]:
        typeNames[0] = {PastDenver}dataset2
    12 Feb 14:04:19 INFO [wfs.json] - about to encode JSON
    

    It seems that there is no pattern for when the error occurs.

    I hope the info I provided here is enough for you guys to understand my problem. Let me know if there is somewhere else in the system that I should be looking for error logs.

    Cheers,

  • How to provide multiple URL endpoints to the same GeoServer instance?

    I’m trying to setup a GeoServer instance where different users can connect to the same underlying datastore using different URLs, in order to key different behavior in another custom GeoServer components I’ve designed.

    More specifically, my GeoServer instance will need to be able to format its outgoing getCapabilities documents to a variety of different, sometimes contradictory, standards. The solution I’m trying to achieve is being able to setup my GeoServer to be reachable via:

    /geoserver/web/standardA

    and

    /geoserver/web/standardB

    and then key the processing of the getCapabilities via the ‘standardA’ or ‘standardB’ component of the URL to determine how to format the getCapabilties document.

    I’ve looked into using proxies but I have not been able to find anything about having more than one proxy configured at a time.

    I’ve also looked into virtual services, but virtual services seem to default to a subset of the datastore with no way to configure them manually. Further, I would need virtual services to still work; if someone goes to /geoserver/web/standardA/ they should get a filtered view of that workspace formatted using standardA.

    Anyone have an idea on how to best achieve this?

  • Geoserver – Bounding Box Of Layer [duplicate]

    This question already has an answer here:

    GeoServer-> Layer Preview:

    When I click on the “Open Layers” Link of a Layer, a Window opens, showing a WMS-representation of the layer within a bounding box.

    How do I directly retrieve the coordinates of this layer’s bounding box from geoserver?

  • Geoserver, how to show only grouplayer in WMS

    I have created serveral layers, they are combined in a group layer.
    When I connect to my WMS it display all layers in the workspace. I want the group layer to be the only layer possible to add, it that possible?

Digest powered by RSS Digest

 Posted by at 13:40
Feb 122015
 
  • Retrieve Extent of Map in specific projection

    Geoserver WMS Layer and WFS Layers that I display with OpenLayers.
    MaxExtent of the map is hard-coded.

    map = new OpenLayers.Map({
        div : "map",
        projection : 'EPSG:31466',
        units : "m",
        maxResolution : 2,
        maxExtent : new OpenLayers.Bounds(363052,5770362,363467,5771122)
    });
    

    Can I make the application calculate the extent based on the bounds of the layers that are added to the map?

  • Can leaflet load tile of level n-1, instead of the tile at level n if it is not found. Without a geo server?

    My application loads the tiles directly from a folder located on a server . I am using leaflet to do so . The tile url pattern is as folows:

      http://localhost/mymap/{z}/{x}/{y}.jpg
    

    My map (google earth tiles) is not complete and there are missing tiles so at some levels not all the tiles appears . Currently I am using an static error Tile Image to be loaded instead .

    What I want (if I am in level n and there are non loaded tiles) is to load the tile that was successfully loaded at level n-1 in place of its 4 sub-tiles in level n, but with some blur or opacity …

    Is that a good Idea ?

    If yes can this be established without a jeo server I mean at the client side (leaflet) ?
    If not what are the best solution for tile error other than loading a default static error tile ?

    Best

Digest powered by RSS Digest

 Posted by at 13:36
Feb 112015
 
  • Geoserver installed but some components not working

    I have installed Geoserver 2.6 on windows 7 32 bit os. Java version is 7.

    • First: installed with installer.exe
    • Second: installed tomcat8 and web archive

    I installed two way. But some components are not working on admin panel. Layer Preview, Stores, Styles, Layers, Layer Groups menus are not working. All menu items are giving this error.

    Error reposrt is like this:

    ERROR [wicket.RequestCycle] - Exception in rendering component: [Component id = filterMatch]
    org.apache.wicket.WicketRuntimeException: Exception in rendering component: [Component id = filterMatch]
        at org.apache.wicket.Component.renderComponent(Component.java:2725)
        at org.apache.wicket.markup.html.WebComponent.onRender(WebComponent.java:62)
        at org.apache.wicket.Component.render(Component.java:2517)
        at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
        at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
        at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:696)
        at org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:114)
        at org.apache.wicket.Component.renderComponent(Component.java:2686)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
        at org.apache.wicket.Component.render(Component.java:2517)
        at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
        at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
        at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
        at org.apache.wicket.markup.html.form.Form.onComponentTagBody(Form.java:1995)
        at org.apache.wicket.Component.renderComponent(Component.java:2686)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
        at org.apache.wicket.Component.render(Component.java:2517)
        at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
        at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
        at org.apache.wicket.MarkupContainer.renderAssociatedMarkup(MarkupContainer.java:696)
        at org.apache.wicket.markup.html.panel.Panel.onComponentTagBody(Panel.java:114)
        at org.apache.wicket.Component.renderComponent(Component.java:2686)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
        at org.apache.wicket.Component.render(Component.java:2517)
        at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1440)
        at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
        at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
        at org.apache.wicket.Component.renderComponent(Component.java:2686)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
        at org.apache.wicket.Component.render(Component.java:2517)
        at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
        at org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:66)
        at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81)
        at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1444)
        at org.apache.wicket.MarkupContainer.renderComponentTagBody(MarkupContainer.java:1603)
        at org.apache.wicket.MarkupContainer.onComponentTagBody(MarkupContainer.java:1527)
        at org.apache.wicket.Component.renderComponent(Component.java:2686)
        at org.apache.wicket.MarkupContainer.onRender(MarkupContainer.java:1538)
        at org.apache.wicket.Component.render(Component.java:2517)
        at org.apache.wicket.MarkupContainer.autoAdd(MarkupContainer.java:229)
        at org.apache.wicket.markup.resolver.MarkupInheritanceResolver.resolve(MarkupInheritanceResolver.java:73)
        at org.apache.wicket.markup.resolver.ComponentResolvers.resolve(ComponentResolvers.java:81)
        at org.apache.wicket.MarkupContainer.renderNext(MarkupContainer.java:1444)
        at org.apache.wicket.MarkupContainer.renderAll(MarkupContainer.java:1554)
        at org.apache.wicket.Page.onRender(Page.java:1575)
        at org.apache.wicket.Component.render(Component.java:2517)
        at org.apache.wicket.Page.renderPage(Page.java:913)
        at org.apache.wicket.request.target.component.BookmarkablePageRequestTarget.respond(BookmarkablePageRequestTarget.java:261)
        at org.apache.wicket.request.AbstractRequestCycleProcessor.respond(AbstractRequestCycleProcessor.java:105)
        at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1258)
        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.doGet(WicketServlet.java:138)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
        at org.springframework.web.servlet.mvc.ServletWrappingController.handleRequestInternal(ServletWrappingController.java:159)
        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:923)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:852)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:882)
        at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:778)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:618)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:725)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.geoserver.filters.ThreadLocalsCleanupFilter.doFilter(ThreadLocalsCleanupFilter.java:28)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:75)
        at org.geoserver.wms.animate.AnimatorFilter.doFilter(AnimatorFilter.java:71)
        at org.geoserver.filters.SpringDelegatingFilter$Chain.doFilter(SpringDelegatingFilter.java:71)
        at org.geoserver.filters.SpringDelegatingFilter.doFilter(SpringDelegatingFilter.java:46)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.geoserver.platform.AdvancedDispatchFilter.doFilter(AdvancedDispatchFilter.java:50)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:311)
        at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116)
        at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
        at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
        at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
        at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)
        at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
        at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.geoserver.security.filter.GeoServerAnonymousAuthenticationFilter.doFilter(GeoServerAnonymousAuthenticationFilter.java:54)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
        at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:182)
        at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
        at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
        at org.geoserver.security.filter.GeoServerUserNamePasswordAuthenticationFilter.doFilter(GeoServerUserNamePasswordAuthenticationFilter.java:116)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
        at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:146)
        at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
        at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:69)
        at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)
        at org.geoserver.security.filter.GeoServerSecurityContextPersistenceFilter$1.doFilter(GeoServerSecurityContextPersistenceFilter.java:53)
        at org.geoserver.security.filter.GeoServerCompositeFilter$NestedFilterChain.doFilter(GeoServerCompositeFilter.java:73)
        at org.geoserver.security.filter.GeoServerCompositeFilter.doFilter(GeoServerCompositeFilter.java:92)
        at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:323)
        at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:173)
        at org.geoserver.security.GeoServerSecurityFilterChainProxy.doFilter(GeoServerSecurityFilterChainProxy.java:135)
        at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:346)
        at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:259)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.geoserver.filters.LoggingFilter.doFilter(LoggingFilter.java:76)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.geoserver.filters.GZIPFilter.doFilter(GZIPFilter.java:42)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.geoserver.filters.SessionDebugFilter.doFilter(SessionDebugFilter.java:48)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.geoserver.filters.FlushSafeFilter.doFilter(FlushSafeFilter.java:44)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.vfny.geoserver.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:109)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:142)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:516)
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1086)
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:659)
        at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558)
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Unknown Source)
    Caused by: java.lang.IllegalArgumentException: Unmatched braces in the pattern.
        at java.text.MessageFormat.applyPattern(Unknown Source)
        at java.text.MessageFormat.<init>(Unknown Source)
        at org.apache.wicket.model.StringResourceModel.getString(StringResourceModel.java:546)
        at org.apache.wicket.model.StringResourceModel.load(StringResourceModel.java:647)
        at org.apache.wicket.model.StringResourceModel.load(StringResourceModel.java:181)
        at org.apache.wicket.model.LoadableDetachableModel.getObject(LoadableDetachableModel.java:120)
        at org.apache.wicket.model.StringResourceModel$AssignmentWrapper.getObject(StringResourceModel.java:241)
        at org.apache.wicket.model.StringResourceModel$AssignmentWrapper.getObject(StringResourceModel.java:216)
        at org.apache.wicket.Component.getDefaultModelObject(Component.java:1720)
        at org.apache.wicket.Component.getDefaultModelObjectAsString(Component.java:1739)
        at org.apache.wicket.markup.html.basic.Label.onComponentTagBody(Label.java:114)
        at org.apache.wicket.Component.renderComponent(Component.java:2686)
        ... 151 more
    
  • How to reload the Geowebcache gwc-gs.xml manually

    Is there a possibility to reload the gwc-gs.xml configuration file manually?
    For example I changed <cacheLayersByDefault>true</cacheLayersByDefault> to false and reloaded the configuration at http://localhost:8082/gwc/demo but it has no effect on the user intreface.

    I also tried to reload it via REST post request:
    enter image description here

    The status code returns an OK but still there are no changes (here is a link to the Geowebcache documentation).

    The reload works if the whole geoserver is restarted.
    Is it possible to reload the gwc-gs.xml file without restarting the geoserver?

  • Display a layer from geoserver using OpenLayers 3

    I’m wondering how to display a Layer in OpenLayers 3 which I host in Geoserver. I imported the Layer from a PostGIS-DB and it is possible to display it using the geoserver preview option. The Layer uses EPSG:3857.

    <html lang="en">
      <head>
        <link rel="stylesheet" href="http://openlayers.org/en/v3.1.1/css/ol.css" type="text/css">
        <style>
          .map {
            height: 900px;
            width: 900px;
          }
        </style>
        <script src="http://openlayers.org/en/v3.1.1/build/ol.js" type="text/javascript"></script>
        <title>test</title>
      </head>
      <body>
          <div id="map" class="map"></div>
    
          <script>
              var layers = [
                  new ol.layer.Tile ({
                    extent: [3359890.5, 5761308, 3395047, 5773695.5],
                    source: new ol.source.TileWMS(/** @type {olx.source.TileWMSOptions} */ 
                        ({      
                        url: 'http://192.168.1.14:8082/geoserver/wms',
                        params: {
                                 'LAYERS': 'jueterbog:fl_spa', 
                                 'TILED': true, 
                                 },
                        title: 'SPA'
                        })
                    )
                  }),
    
                    new ol.layer.Tile   ({
                    source: new ol.source.OSM()
                    })
              ];
    
              var map = new ol.Map  ({
                  layers: layers,
                  target: 'map',
                  view: new ol.View   ({
                    center: [1450000,6809000],
                    zoom: 12
                })
              });
          </script>
    
      </body>
    </html>
    

    The Layer should be displayed in this area: 52.025151, 13.069072

  • I converted a KML file into a PostGIS db using ogr2ogr. How do I publish all the tables as seperate layers?

    As the title says I converted/imported a KML file into my PostGIS database using the ogr2ogr command. Now I am trying to publish each table as a seperate layer onto a GeoServer. I know about cURL, but as far as I can see I would have to have a new command for each table in the db. I have 124 tables I need to publish so doing that one by one would be labor intensive. Is there anyway straight-forward way to streamline this process?

  • Can’t confirm removal in GeoServer interface

    I’m using GeoServer 2.6.1 on an Amazon EC2, with Ubuntu 14.04.

    There are a few situations where the GeoServer interface asks for confirmation in a popup to proceed with an action, in this case I’m trying to disable tiling for a given layer. The problem is that the popup shows, but it is empty, i.e. there is no “OK” button in it, so I can’t proceed. Any ideas?

    I’ve tried in Chrome, IE, and Firefox, and JavaScript and popups are enabled. I also just tried rebooting the EC2 instance, but the issue persists.

    Thanks for reading.

    UPDATE: Seems like time heals all wounds. Things are working fine now, after no real change that I’m aware of, so I guess this is just an intermittent issue.

  • OpenLayers/GeoServer layer zooms in and then out again

    I have a strange ZOOM behavior. I am using GeoServer 2.6.1/OpenLayers 2.13.1. I have a layer I created from a MrSid file and am serving as a wms layer. Lets call it the “problematic” layer. When I serve this “problematic” layer alone, everything is ok. When I serve it with a base layer, I get a strange effect: when I zoom in, the “problematic” layer zooms in, then zooms back out again. If I click on a check box to hide the “problematic” layer (and only show the base layer which is at correct zoom) and then I click on the check box to show the “problematic” layer again, it aligns correctly with the base layer. On the GeoServer side, I am “forcing declared” on both the base layer and the “problematic” layer. The Native SRS and the Declared SRS are both set to EPSG:2236. On the OpenLayers side, I am using the displayProjection setting and have it also set to 2236 as recommend in other threads. What could be the issue?

    OpenLayers Code:

    var map, baseLayer, problematicLayer;
    
            // pink tile avoidance
            OpenLayers.IMAGE_RELOAD_ATTEMPTS = 5;
            // make OL compute scale according to WMS spec
            OpenLayers.DOTS_PER_INCH = 25.4 / 0.28;
    
    
            function init() {
    
                // Setup Projection
                epsg2236 = new OpenLayers.Projection("EPSG:2236");
    
                // Setup Format
                format = 'image/png';
    
                // Setup Extent
                var bounds = new OpenLayers.Bounds(
                        858665.911628, 516256.950565,
                        870969.136, 527480.405429
                    );
    
    
                // Setup Map Options
                var options = {
                    maxExtent: bounds,
                    maxResolution: 128.890625,
                    projection: epsg2236,
                    displayProjection: epsg2236,
                    units: 'm'
                };
    
                // Setup Map
                map = new OpenLayers.Map('map', options);
    
                // Setup tiled base layer
                baseLayer = new OpenLayers.Layer.WMS(
                    "sf:base_lines - Tiled",
                    "http://server01:8085/geoserver/sf/wms",
                    {
                        "LAYERS": 'sf:base_lines',
                        "STYLES": '',
                        TRANSPARENT: 'true',
                        format: format
                    },
                    {
                        visibility: true,
                        buffer: 0,
                        displayOutsideMaxExtent: true,
                        isBaseLayer: true,
                        yx: { 'EPSG:2236': false }
                    }
                );
    
                // The Problematic Layer
                problematicLayer = new OpenLayers.Layer.WMS(
                        "sf:SID_2014 - Tiled",
                        "http://server01:8085/geoserver/sf/wms",
                    {
                        "LAYERS": 'sf:SID_2014',
                        "STYLES": '',
                        TRANSPARENT: 'true',
                        format: format
                    },
                    {
                        visibility: false,
                        buffer: 0,
                        displayOutsideMaxExtent: true,
                        isBaseLayer: true,
                        yx: { 'EPSG:2236': false }
                    }
                );
    
    
     map.addLayers([baseLayer, problematicLayer]);
    
    
    // Add MousePosition Control
                map.addControl(new OpenLayers.Control.MousePosition());
    
                // Zoom to Max Extent
                if (!map.getCenter()) {
                    map.zoomToMaxExtent();
                }
     } 
    

    Thanks Before Hand

Digest powered by RSS Digest

 Posted by at 13:37
Feb 102015
 
  • Technical requirements for installing Geoserver and having a web mapping platform

    I have taken up a new job, and I need to undertake some web mapping. I have done some web mapping before with a pre-existing installation of Geoserver but I have never had the charge of having to set up one prior to use. My employer want my advice on what is required to set up a web mapping platform like Geoserver, Mapserver or Geonode. We have a strict data management plan, meaning I can’t use an external host.

    Please what is required to set up a web mapping platform ? What technical bits/requirements will be needed ? I know there is a server involved, is it the server that will host my installation and the platform ? I can’t quite figure out the whole set up yet.

  • XML Parsing Error: error in WFS request with Openlayers

    I have written a script using OpenLayers library to get some layers from Geoserver and display them on the map. I use both WMS and WFS layers.
    Everything worked fine in my localhost (MAMP) in windows OS.
    Now I have to migrate in an UBUNTU 12.10 system. Although I get the WMS correctly, I can not make it to get the WFS.

    I used firebug and this is the POST request:

    <wfs:GetFeature xmlns:wfs="http://www.opengis.net/wfs" service="WFS" version="1.1.0" xsi:schemaLocation="http://www.opengis.net/wfs http://schemas.opengis.net/wfs/1.1.0/wfs.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
     <wfs:Query typeName="rural:foc_network" srsName="EPSG:4326" xmlns:rural="http://www.opengeospatial.net/rural">
     <ogc:Filter xmlns:ogc="http://www.opengis.net/ogc">
     <ogc:BBOX>
     <gml:Envelope xmlns:gml="http://www.opengis.net/gml" srsName="EPSG:4326">
     <gml:lowerCorner>21.831815896484 37.948519811767</gml:lowerCorner>
     <gml:upperCorner>22.346800027344 38.120181188719</gml:upperCorner>
     </gml:Envelope>
     </ogc:BBOX>
     </ogc:Filter>
     </wfs:Query>
    </wfs:GetFeature>
    

    And this the POST response (which is actually the content of my cgi file:

     #!/usr/bin/env python
    
    """This is a blind proxy that we use to get around browser
    restrictions that prevent the Javascript from loading pages not on the
    same server as the Javascript.  This has several problems: it's less
    efficient, it might break some sites, and it's a security risk because
    people can use this proxy to browse the web and p
    

    In the XML tag of firegu I get this error:

     XML Parsing Error: not well-formed Location: moz-nullprincipal:{79ed7c81-0daf-4525-a315-808f0894befd} Line Number 1, Column 2:
    
     #!/usr/bin/env python
    

    Do you have any idea what is going wrong here? Is the path: #!/usr/bin/env python wrongly set? Or what else could be the problem?

    And this is my WFS request:

      wfs_layer_komvoi = new OpenLayers.Layer.Vector("Κόμβοι", {
            strategies: [new OpenLayers.Strategy.BBOX()],
            protocol: new OpenLayers.Protocol.WFS({
                    version: "1.1.0",
                    url: "http://localhost:8080/geoserver/wfs", 
                    featurePrefix: "rural", //workspace from geoserver
                    featureType: "komvoi_real", //layer name from geoserver
                            featureNS : "http://www.opengeospatial.net/rural", //namespace from geoserver
                            styles: "point"
                        })
                    })
    

    Thanks
    D.

  • Geotransformation, from sat coordinates to Earth coordiantes

    I’m using this code: https://github.com/mcidasv/mcidasv/blob/master/ucar/unidata/geoloc/projection/sat/GEOSTransform.java
    to retrieve longitude and latitude in Earth system from column, line coordinates in Satellite system.
    This is my code:

    public class Main {
    
    private final static double COFF=1856;
    private final static double LOFF=1856;
    private final static double CFAC = -781648343;
    private final static double LFAC = -781648343;
    
    public static void main(String args[]){
    
        GEOSTransform geo = new GEOSTransform(0, GEOSTransform.GEOS, GEOSTransform.WGS84);
    
        /*
        double[] lonlat = geo.FGFtoEarth(1, 34, CFAC, COFF, LFAC, LOFF);
        System.out.println("LONLAT "+lonlat[0]+", "+lonlat[1])
        */
        for(int x=1; x<1000;x+=1)
            for(int y=1;y<1000;y+=1){
                double[] lonlat = geo.FGFtoEarth(x, y, CFAC, COFF, LFAC, LOFF);
                System.out.println("LONLAT "+lonlat[0]+", "+lonlat[1]+": xy "+x+", "+y);
            }
        }
    }
    

    and I get NaN values from FGFtoEarth. Why? For that method, the doc says “Transform fractional FGF coordinates to (longitude, latitude).” What are fraction FGF coordinates? I think there is something wrong with the passed in coordinates.
    Note that const members I think are correct, but I’m not sure if CFAC and LFAC are negative like above, or positive. Anyway in both case the result is the same, NaN values.

Digest powered by RSS Digest

 Posted by at 13:42
Feb 092015
 
  • How to obtain a `GridCoverage2D` from Geoserver raster layer?

    I am learning java programming with geoserver. I see that in geoserver web services if you pick a raster layer as an input parameter (e.g. img1) from the web service builder interface, in the java code behind the web service, you will have a GridCoverage2D img1 readily supplied to the entry function.

    My questions, How can I obtain a GridCoverage2D object in Java for an arbitrary geoserver raster layer (specified by workspace, store etc.) not in the input parameter list?

    Thanks.

Digest powered by RSS Digest

 Posted by at 13:42
Feb 072015
 
  • how to find necessary geoserver/geotools maven dependencies for a class?

    I am trying to create a Web Processing Service with GeoServer. I used maven following opengeo instructions, and I get an eclipse project with a pom.xml file with dependencies like the following:

     <dependencies>
       <dependency>
         <groupId>org.geotools</groupId>
         <artifactId>gt-process</artifactId>
         <version>12-SNAPSHOT</version>
       </dependency>
       <dependency>
         <groupId>org.geotools</groupId>
         <artifactId>gt-geometry</artifactId>
         <version>12-SNAPSHOT</version>
       </dependency>
       ...
     </dependencies>
    

    Now there is only a limited set of dependencies in the example. If I add other classes, I often get errors about class not being resolved. For example,

    import org.geoserver.wps.WPSStorageCleaner;
    

    or

    import org.geotools.gce.geotiff.GeoTiffReader;
    

    My question is, in general, where/how can I find out the correct values of <groupId>, <artifactId> etc. for classes like above? Is there a central registry for this kind of info?

    Note: I need to do this in maven, and not by otherwise fiddling with eclipse settings and the like.

    Thanks in advance.

Digest powered by RSS Digest

 Posted by at 13:41
Feb 062015
 
  • Printing GeoJSON layer

    I am trying to print a GeoJSON layer that I create myself programatically.
    The way that I am using is the following:

    var style = {
        externalGraphic: "images/drop.png",
        graphicOpacity: 1, 
        graphicWidth: 18, 
        graphicHeight: 18
    };
    var vecLayer = new OpenLayers.Layer.Vector("vector", {
        styleMap: new OpenLayers.StyleMap({
             "default": style
        })
    });
    map.addLayer(vecLayer);
    
    function createLayer (json_response) {
        for (i = 0; i < json_response.data.length; i++){
            var point = new OpenLayers.Geometry.Point(json_response.data[i].longitude, json_response.data[i].latitude);
            var attributes = {location: json_response.data[i].location_string, photo: json_response.data[i].see_all_photos, web_url: json_response.data[i].web_url, write_review: json_response.data[i].write_review, name: json_response.data[i].name, rating_image: json_response.data[i].rating_image_url, address: json_response.data[i].address_obj.address_string, num_reviews: json_response.data[i].num_reviews};
            var feature = new OpenLayers.Feature.Vector(point, attributes);
            vecLayer.addFeatures([feature]);
        }
    }
    

    I am using the GeoServer print module for this task.
    I can print WMS layers.
    I can actually also print GeoJSON layers, but approx. after 30 points in the point layer (I believe since the url becomes too long) I get an error on Firefox such as:
    An error occurred while loading the PDF. PDF.js v0.8.1181 (build: 31ea4e0) Message: stream must have data

    Do you know if there is a way to somehow overcome this problem?

    Thanks!

  • Is there anyway to load a Geoserver map through a Rest Service that I have created?

    I am in need of loading my geoserver map through a “proxy” which is my backend java. So I was wondering if it was possible to load the tiles through a rest service call. Here is what I have as a rest service so far.
    `

    @GET
    @Path("/map")
    @Produces("image/gif")
    public Response getGeoServ(@PathParam("layer") String layer){
    
    
        BufferedImage img = restTemplate.getForObject("http://172.16.10.xxx:8080/geoserver/Global/wms?service=WMS&version=1.1.0&request=GetMap&layers=Global Map&styles=&bbox=-180,-90,180,90&width=660&height=330&srs=EPSG:4326&format=application/openlayers", BufferedImage.class, layer);
        return Response.ok(img).build();
    
    
    }`
    
  • Oppenlayers 3 WMS getfeatureinfo popup

    I have a map a at the link below:
    http://gis.xyz/openlayers/openlayer.html
    I added one of my geoserver layer to the map, now I try to add the attributes window pop up on click. I found to examples on the ol3 homepage, but I cannot put together a working code..
    http://openlayers.org/en/v3.1.1/examples/popup.html?q=popup
    http://openlayers.org/en/v3.1.1/examples/getfeatureinfo-tile.html?q=popup
    Is there any chance to have a working sample somewhere?

Digest powered by RSS Digest

 Posted by at 13:36
Feb 052015
 
  • Improve GeoServer WMS tile loading delay

    I’m using OpenLayers 2.13 and GeoServer 2.3.5 for my development.
    Following code is I’m using for loading map tiles..

    map.addLayer(new OpenLayers.Layer.WMS(
        "LoadedLayers",
        url,
        {
            width: '1062',
            height: '286',
            srs: 'EPSG:3857',
            layers: multipleLayers,
            styles: '',
            format: 'image/png',
            bgcolor: '0x80BDE3'
         },
         {
            singleTile: true,
            //tiled: true,
            //tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom,
            ratio: 1,
            visibility: true,
            isBaseLayer: true
        }
    );
    

    While using SingleTile:true option map is taking around 10 to 15 seconds to load the tiles.Here only single wms request is going to server.

    Then I have tried to use like below

    tiled: true,
    tilesOrigin : map.maxExtent.left + ',' + map.maxExtent.bottom,
    

    But, here also its taking around 10 seconds to load map complete tiles.And the width: and height: of the tile is changed to 256. And here around 20 to 24 request is going to server.

    Can we change the width and height in tiled:true option.? or is there any other method to improve wms tile loading delay using limited wms request.

    Sample Single Tile GeoServer request url:

    localhost:7080/geoserver/wms?LAYERS=layer%3Alanduse_district_border%2Clayer%3Alanduse_city_border%2Clayer%3Alanduse_builtup_area%2Clayer%3Alanduse_park%2Clayer%3Alanduse_lake%2Clayer%3Arailway_line%2Clayer%3Apoi_railway_station%2Clayer%3Aroad_colony%2Clayer%3Aroad_minor%2Clayer%3Aroad_major%2Clayer%3Alocation_placename%2Clayer%3Alocation_major_placename%2Clayer%3Alocation_major_cityname%2Clayer%3Apoi_bus_stand%2Clayer%3Apoi_hotel_restaurant%2Clayer%3Apoi_hospital%2Clayer%3Apoi_airport%2Clayer%3Apoi_police_station&WIDTH=1062&HEIGHT=286&STYLES=&FORMAT=image%2Fpng&BGCOLOR=0x80BDE3&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG%3A4326&BBOX=77.123507022705,28.607589532471,77.305811405029,28.656684686279
    

    Sample Single Tile GeoServer request url:

    localhost:7080/geoserver/wms?LAYERS=layer%3Alanduse_district_border%2Clayer%3Alanduse_city_border%2Clayer%3Alanduse_builtup_area%2Clayer%3Alanduse_park%2Clayer%3Alanduse_lake%2Clayer%3Arailway_line%2Clayer%3Apoi_railway_station%2Clayer%3Aroad_colony%2Clayer%3Aroad_minor%2Clayer%3Aroad_major%2Clayer%3Alocation_placename%2Clayer%3Alocation_major_placename%2Clayer%3Alocation_major_cityname%2Clayer%3Apoi_bus_stand%2Clayer%3Apoi_hotel_restaurant%2Clayer%3Apoi_hospital%2Clayer%3Apoi_airport%2Clayer%3Apoi_police_station&WIDTH=256&HEIGHT=256&STYLES=&FORMAT=image%2Fpng&BGCOLOR=0x80BDE3&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&SRS=EPSG%3A4326&BBOX=77.16796875,28.65234375,77.2119140625,28.6962890625
    

    Thanking You

    Ramesh..

  • how to delete a style that associated to a layer?

    I want to apply a style to a layer by rest.at the first time everything is ok. But when I change the content of the sld file in the style folder mannually,it doesn’t apply to the layer. I want a way to do this by rest,not by submit the style through the style editor in geoserver.and How can I remove binding of astyle from a layer?

  • GeoServer REST API bug – “The specified coverageName is not supported”

    I’ve encountered a problem with GeoServer REST in both 2.6.2 and 2.5.4 (though not, interestingly, in 2.3.1).

    When adding a GeoTIFF with a path accessible to GeoServer, the server replies with:

    The specified coverageName resttestdemis not supported
    

    This happens when I use cURL:

    curl -X POST -d '<coverage><enabled>true</enabled><metadata /><keywords /><metadataLinks /><name>resttestdem</name><title>resttestdem</title><srs>EPSG:4326</srs><projectionPolicy>REPROJECT_TO_DECLARED</projectionPolicy></coverage>' http://admin:geoserver@localhost:8080/geoserver/rest/workspaces/fake_rfe2/coveragestores/testRESTStoreGeotiff/coverages.xml --header "Content-Type:application/xml"
    :The specified coverageName resttestdemis not supported
    

    And also when I use GeoServer Manager:

    08:22:15.077 [main] DEBUG httpclient.wire.header - >> "POST /geoserver/rest/workspaces/fake_rfe2/coveragestores/testRESTStoreGeotiff/coverages.xml HTTP/1.1[\r][\n]"
    08:22:15.079 [main] DEBUG o.a.c.httpclient.HttpMethodBase - Adding Host request header
    08:22:15.079 [main] DEBUG httpclient.wire.header - >> "Authorization: Basic YWRtaW46Z2Vvc2VydmVy[\r][\n]"
    08:22:15.079 [main] DEBUG httpclient.wire.header - >> "User-Agent: Jakarta Commons-HttpClient/3.1[\r][\n]"
    08:22:15.080 [main] DEBUG httpclient.wire.header - >> "Host: localhost:8080[\r][\n]"
    08:22:15.080 [main] DEBUG httpclient.wire.header - >> "Content-Length: 213[\r][\n]"
    08:22:15.080 [main] DEBUG httpclient.wire.header - >> "Content-Type: text/xml[\r][\n]"
    08:22:15.080 [main] DEBUG httpclient.wire.header - >> "[\r][\n]"
    08:22:15.081 [main] DEBUG httpclient.wire.content - >> "<coverage><enabled>true</enabled><metadata /><keywords /><metadataLinks /><name>resttestdem</name><title>resttestdem</title><srs>EPSG:4326</srs><projectionPolicy>REPROJECT_TO_DECLARED</projectionPolicy></coverage>"
    08:22:15.081 [main] DEBUG o.a.c.h.m.EntityEnclosingMethod - Request body sent
    08:22:15.198 [main] DEBUG httpclient.wire.header - << "HTTP/1.1 500 Internal Server Error[\r][\n]"
    08:22:15.198 [main] DEBUG httpclient.wire.header - << "HTTP/1.1 500 Internal Server Error[\r][\n]"
    08:22:15.198 [main] DEBUG httpclient.wire.header - << "Content-Type: text/plain[\r][\n]"
    08:22:15.198 [main] DEBUG httpclient.wire.header - << "Transfer-Encoding: chunked[\r][\n]"
    08:22:15.198 [main] DEBUG httpclient.wire.header - << "Server: Jetty(6.1.8)[\r][\n]"
    08:22:15.199 [main] DEBUG httpclient.wire.header - << "[\r][\n]"
    08:22:15.199 [main] DEBUG httpclient.wire.content - << "3"
    08:22:15.199 [main] DEBUG httpclient.wire.content - << "7"
    08:22:15.199 [main] DEBUG httpclient.wire.content - << "[\r]"
    08:22:15.199 [main] DEBUG httpclient.wire.content - << "[\n]"
    08:22:15.199 [main] DEBUG httpclient.wire.content - << ":The specified coverageName resttestdemis not supported"
    08:22:15.200 [main] DEBUG httpclient.wire.content - << "[\r]"
    08:22:15.200 [main] DEBUG httpclient.wire.content - << "[\n]"
    08:22:15.200 [main] DEBUG httpclient.wire.content - << "0"
    08:22:15.200 [main] DEBUG httpclient.wire.content - << "[\r]"
    08:22:15.200 [main] DEBUG httpclient.wire.content - << "[\n]"
    08:22:15.200 [main] DEBUG httpclient.wire.content - << "[\r]"
    08:22:15.200 [main] DEBUG httpclient.wire.content - << "[\n]"
    08:22:15.200 [main] DEBUG httpclient.wire.header - << "[\r][\n]"
    

    When this happens, the following stacktrace appears in the server log:

    Caused by: java.lang.IllegalArgumentException: The specified coverageName resttestdemis not supported
      at org.geotools.coverage.grid.io.AbstractGridCoverage2DReader.getCoordinateReferenceSystem(AbstractGridCoverage2DReader.java:820)
      at org.geoserver.catalog.CoverageDimensionCustomizerReader.getCoordinateReferenceSystem(CoverageDimensionCustomizerReader.java:317)
      at org.geoserver.catalog.SingleGridCoverage2DReader.getCoordinateReferenceSystem(SingleGridCoverage2DReader.java:151)
      at org.geoserver.catalog.CatalogBuilder.initCoverage(CatalogBuilder.java:790)
      at org.geoserver.catalog.rest.CoverageResource.handleObjectPost(CoverageResource.java:87)
      at org.geoserver.rest.ReflectiveResource.handlePost(ReflectiveResource.java:121)
    

    Looking at AbstractGridCoverage2DReader.getCoordinateReferenceSystem:

    /**
     * Retrieves the {@link GeneralEnvelope} for this {@link AbstractGridCoverage2DReader}.
     * 
     * @return the {@link GeneralEnvelope} for this {@link AbstractGridCoverage2DReader}.
     */
    @Override
    public CoordinateReferenceSystem getCoordinateReferenceSystem(String coverageName) {
        if (!checkName(coverageName)) {
            throw new IllegalArgumentException("The specified coverageName " + coverageName
                    + "is not supported");
        }
    
        return crs;
    }
    

    It appears that checkName is returning false, which means that coverageName != this.coverageName or coverageName == null. Hmm.

    Any ideas?

Digest powered by RSS Digest

 Posted by at 13:38
%d bloggers like this:
Close Bitnami banner
Bitnami