New answers tagged

0

For anyone else who wants to know how to recover a layer when the default style is deleted and it breaks the entire layer and essentially the GeoServer GUI interface for that layer. 1) Create a new default style SLD file using the GeoServer GUI or through curl. I ended up being able to create the new default style SLD file through the GUI. I called it ...


0

I just applied the patch to ol 2.13.1 (from tag) The last patch file from trac didn't work when no restrictedExtent was given, so I fixed it as well. You can get it here, along with a text example: https://github.com/glferri/ol2-reproj-2.13.1/blob/master/OL.Reproject_2.13.1_fixRestrictedExtent.patch


-2

geoserver Web archive helps: http://docs.geoserver.org/stable/en/user/installation/war.html. I follow the instruction and everything works out.


1

I already found an answer myself: I had to use x-www-form-urlencoded key-value data.


0

My only solution to getting MrSID working with geoserver was to uninstall the OpenGeo suite and install geoserver 2.8.3 directly. Then following the above steps worked as expected. OpenGeo suite appears to only support MrSID in its Enterprise version: http://suite.opengeo.org/docs/latest/dataadmin/mrsid/index.html


1

I got the same problem, and try several hours to uninstall and reinstall my geoserver. Later on I found this geoserver Web archive: http://docs.geoserver.org/stable/en/user/installation/war.html. I follow the instruction and everything works out. Good luck!!


0

It looks like you have deleted or renamed the style that was the default for those layers. The easiest way to fix this is to delete the layers affected and recreate them using your restore/load scripts. Alternatively you can restore the whole data directory from your last backup. If you don't have a backup or load scripts then look on this as learning ...


2

Usually you draw a second layer over the top of the map with a different style and a filter that makes your selection specified in the CQL filter that goes with the selection layer.


1

I don't believe it's doable out of the box given than your shapefile still contains all the styling bits as a JSON string inside an attribute. Either find a way to split them into separate columns with a further conversion, and then you'll be able to follow Ian's advice, or write a new filter function that can parse JSON and extract properties out of it, ...


2

For GeoServer 2.8.x you can use compositing to achieve a "inner stroke" effect, see here: http://docs.geoserver.org/2.8.x/en/user/styling/sld-extensions/composite-blend/example.html


1

You can use <PerpendicularOffset>5</PerpendicularOffset> A positive value places the offset line on the left of the line. In the example above the offset is 5 pixels. You can then specify the line thickness, so if you want an inner line 10 pixels wide and touching the perimeter, I would try setting the offset to 5 and the line thickness to 10. ...


0

You can use the properties of the file in your sld file to set all the values that you require. <sld:stroke > <CSSParameter name = 'stroke'> <ogc:propertyName>stroke </ogc:propertyName> </CSSParameter > </sld:stroke >


0

I know this is kind of an OLD thread, but I have looked for two days for an answer to this same error message about output dimensions needing to be 2 or 3. I think i have found a solution that could be useful to your problem as well as mine, so I'm going to share it. It worked for me. My issue, specifically, was when I converted a bunch of KML's from Google ...


2

That depends on the authentication filters setup in your GeoServer instance: http://docs.geoserver.org/latest/en/user/security/auth/index.html If you have it configured as out of the box, you can add HTTP basic authentication headers: https://it.wikipedia.org/wiki/Basic_access_authentication Of course, best use that only along with SSL encryption to ...


0

Have you considered GeoNode? It's based on Django which is used for user/groups authentication and it is using the same stack you mentioned (Postgres/PostGIS Geoserver & Openlayers) http://geonode.org/


2

I solve this option using VendorOption <sld:VendorOption name="polygonAlign">mbr</sld:VendorOption> <sld:VendorOption name="goodnessOfFit">0.3</sld:VendorOption> <sld:VendorOption name="partials">true</sld:VendorOption> --> <sld:VendorOption name="autoWrap">80</sld:VendorOption> ...


0

This is an old post but there is no clear solution.. I noticed something odd in the SLD. The <ogc:Function name="parameter"> of the <ogc:Function name="gs:CropCoverage"> should be close before the <ogc:Function name="gs:BarnesSurface"> starts, no? Anyway, this did get rid of the above error in my case. I was not yet successful in combining ...


0

My problem solved. After convert shapefile to table with postgis tools, that problem occured. I use another ways to convert shapefile to postgresql spatial table. Edit: I use arcgis. i create connection to postgresql in arcgis and then import shapefile to postgresql spatial table.


0

I figured out a work around this error, it's not exactly what I hoped for but it gets the job done. So all I have to do is to modify the XML code for the update transaction in Javascript like this: var str=new XMLSerializer().serializeToString(node); var data=str.replace("feature:myLayer","myNameSpace:myLayer"); and then send data with an AJAX call to ...


3

While it's possible and common to publish views in GeoServer WFS, the access is limited to read-only usage, you won't be able to edit them. GeoServer normally marks views as read only because it cannot find a primary key in them (pk is mandatory to generate the gml:id and to support featureid filters). To make the view editable, assuming you can find a ...


0

The additional information in the kml file that you wish to use and you refer to as "metadata", could be in the KML jargon: Styles and Stylemaps ExtendedData Custom information in the Description field of a Placemark, usually in the form of html tables Since each kml file is an ASCII file, it can be processed via a text-processing script. According to ...


1

You may need to create and exception rule only applicable to getMap requests. look at this reference link: http://docs.geoserver.org/stable/en/user/services/wms/reference.html https://github.com/geoserver/geoserver/commit/a5985f42bd9ebe985310ae83252b4cb32e45fb1b


1

You can use a maxExtent for your map. In combination with a 3rd-party background-layer this can prevent the problem you described. var extent = new OpenLayers.Bounds(-2003750.34, -2003750.34, 2003750.34, 2003750.34); map = new OpenLayers.Map("map", { maxExtent: extent });


1

The simplest answer is to use a CQL filter in the WMS request to restrict which landuse types are drawn on the map. There is a full tutorial available to get you going. However in your case it would be something like: http://...../geoserver/wms?....&CQL_FILTER=landuse='grass' when you want to filter by grass or more complex options like: ...


1

In the past I've overcome this by replacing the whole where clause with a parameter, and then set the default to 1=1 SELECT * FROM areas WHERE %query& you can then supply the full clause e.g. landuse = 'grass' within the parameter declaration in the URL. I appreciate this is a slightly unsatisfactory, and there would be more elegant solutions ...


3

Make sure that you are using an EPSG code of http://www.opengis.net/gml/srs/epsg.xml#4326 instead of epsg:4326 so that the X/Y lat/Lon mapping is fixed rather than variable as it is with epsg:4326. Then make sure you are encoding the geometries that you send in the same order as you have told GeoServer to expect them. See the GeoServer documentation for a ...


1

I solved this by using the XYZ layer type. This can take the optional path_format which I configured like this: path_format = '${z}/${x}/${y}' and that builds the proper URL.


1

solved myself: added geometryName: "geom" in the WFS constructor. (Still don't know why this is necessary for this layer only).


0

Just to mention, Geoserver recently release 2.9-RC1, which comes with the more updated jetty (v9+) that supports CORS. Similar to the one mentioned by Ahmed GIS, you need to download the correct version of the jetty servlets. But this time, it is to copy into the directory "\WEB-INF\lib", and to edit the file "WEB-INF\web.xml" instead.


0

for starters... try TileMatrix=EPSG%3A38579%3A9 in the URL //ESPG:3857:9 change matrixIds[z] = z to matrixIds[z] = 'ESPG:3857:' + z (same issue - this fix worked for me) check the WMTS Get Capabilities to ensure you are referencing the correct tilematrix set (in my case I'm using ESPG:900913) and column and row indices conform to the limits defined for ...


0

To deploy you can copy the war file in /var/lib/tomcat7/webapps


5

Yes, it's pure xml validation against the SLD XML schemas. However, it's against the extended SLD schema that GeoServer has internally, e.g.: http://demo.geo-solutions.it/geoserver/schemas/sld/StyledLayerDescriptor.xsd So you can take this schema and use a command line validator against the GeoServer data directory I believe


0

I found that the issue was that my "GET" requests exceeded the maximum string length. I had to switch to using a "POST" request which then threw an error due to violating the cross origin rule. The solution to geoserver/mapfish printing using the POST option can be found here; WMS server with CORS enabled? Simply paste this code at the beginning of your ...


0

The solution to geoserver/mapfish printing using the POST option can be found here; WMS server with CORS enabled? Simply paste this code at the beginning of your Javascript: (function() { var cors_api_host = 'cors-anywhere.herokuapp.com'; var cors_api_url = 'https://' + cors_api_host + '/'; var slice = [].slice; var origin = ...


2

The reason for the error is most probably that the geometry type of the WFS feature type is defined to be MultiLinestring or MultiPolygon, but QGIS it trying to insert simple Linestring or Polygon. You can check the WFS geometry type by making a DescribeFeatureType request. For example ...


0

You need to compare the result of the function to true, so your example would look like: <ogc:Filter> <ogc:PropertyIsEqualTo> <ogc:Function name="in"> <ogc:PropertyName>type</ogc:PropertyName> <ogc:Literal>0</ogc:Literal> <ogc:Literal>23</ogc:Literal> ...


1

I would go with something like: <ogc:Function name="in"> <ogc:PropertyName>name</ogc:PropertyName> <ogc:Literal>1</ogc:Literal> <ogc:Literal>11</ogc:Literal> <ogc:Literal>62</ogc:Literal> <ogc:Literal>42</ogc:Literal> </ogc:Function> Alternatively generate a new ...


1

Figured out the issue. The URL was wrong instead of it being http://localhost:8080/geoserver/cite/wms it should have been http://localhost:8080/geoserver/wms


0

GeoServer has the option to "Return bounding box with every feature" under Services » Web Feature Service (WFS) » WFS settings. According to GeoServer documentation: Return bounding box with every feature — When creating the GetFeature GML output, adds an auto-calculated bounds element on each feature type. Not typically enabled, as including ...


0

You can use other operators like: <PropertyIsEqualTo> <PropertyIsNotEqualTo> <PropertyIsLessThan> <PropertyIsLessThanOrEqualTo> <PropertyIsGreaterThan> <PropertyIsGreaterThanOrEqualTo> Check here the geoserver doc. For array, check the "in" comparison function.


0

I just set this up on a test server here and got it to work. One issue I see in your question: the doc says the "Group Search Base" should be "CN=Users". That setting works fine for me. You have something different in your config. I think the settings you show are for the sample LDAP setup on the docs, there is also a specific section on Active Directory ...


0

above answer is correct, but getFeatureInfoUrl function creates only the WFS request of crs EPSG:4326. uses this modified function, because this way WFS request is created based on used crs, regardless of whether it is 4326 or 3857: getFeatureInfoUrl: function (latlng) { // Construct a GetFeatureInfo request URL given a point var point = ...


0

Your code contains: &CQL_FILTER=user_id=1 And I will guess that the two =s are messing up the URL. In Leaflet WMS tilelayers, any extra options which are not defined will be passed to the WMS server as parameters in each request URL, so: var layer = L.tileLayer.wms( 'http://my_wms_adress:8080/geoserver/my_location/wms', { ...


2

Layers published as sql views are not editable, you have to publish them as normal tables instead


1

You can have array columns in a table. For your example table the create statement would be along the following lines. CREATE TABLE spatial_table ( name VARCHAR(20), timestamps timestamp[], the_geom geometry )


0

You can generate a query that outputs GeoJSON objects with the ST_AsGeoJSON function. Here's a question and answer that explains how: SQL query to have a complete geojson feature from PostGIS


0

You can add conditional statements to freemarker templates. For example in your content.ftl file you can add something like this to only list "YOUR_FIELDNAME". <#if attribute.name == "YOUR_FIELDNAME"> <li>${attribute.name}: ${attribute.value}</li> </#if> Alternatively you can exclude a field by doing this: <#if ...


2

You need to set the http proxy variables either using a system environment variable or through a JVM property set in catalina.sh. There are detailed steps on how to do this on the WFS Store page. In the past there have been issues with the HTTP COnnection pooling not picking up the proxy variables so if it continues to not work try unclicking the ...


2

As you can see in the documentation this is achieved by applying two (or more) marks to the point. So for your example something like: [usage='example'] { mark: symbol('square'), symbol('circle'); } [usage='example'] :nth-mark(1) { size: 16px; fill: yellow; } [usage='example'] :nth-mark(2) { size: 14px; fill: red; }


2

It is dependent on the tool you are using for the POST, but there are examples in the GeoServer documentation (e.g. http://docs.geoserver.org/latest/en/user/security/tutorials/digest/index.html). In curl, it is -u myusernamer:mypassword, in wget, it is --user myusernamer --password mypassword (same convention as in the question). In the browser, it will ...



Top 50 recent answers are included