Hot answers tagged

5

1) Add a new geometry column: ALTER TABLE mytable ADD COLUMN geom geometry(Point, 4326); 2) Update the new column with the geometry from your long and lat columns: UPDATE mytable SET geom = ST_SetSRID(ST_MakePoint(long, lat), 4326);


4

I don't think there is a way to do 1 but 2 is easy, as the WFS reference (or the WFS standard) point out you can specify the attributes you wish returned in your getFeature request. To restrict a GetFeature request by attribute rather than feature, use the propertyName key in the form propertyName=attribute. You can specify a single attribute, or ...


4

The best place to look for details like this is in the standard. Inserting non spatial attributes is done in exactly the same way as adding spatial attributes. First check the schema of the feature type by using a describeFeature request, then construct a Transaction request with the attribute values in the same order as the schema requires.


3

You got pretty close to the actual syntax (it's a GeoServer extension mind, not part of the OGC standards): http://blog.geoserver.org/2008/12/08/dynamic-symbolizers-part-1/


3

If you have control over the geoserver and you use the html format, you could modify the template server side. Otherwise I can think of retrieving the FeatureInfo as GML2 or text and modify if client-side. But I don't know how this might be implemented in openlayers.


2

There is no copy facility in the UI, but I believe you could create one using the REST API and a bit of programming instead, just grab both the resource (feature type or coverage) and the layer using a GET request, and then POST a modified version with only the name changed back: http://docs.geoserver.org/stable/en/user/rest/index.html


2

After looking at the Geoserver docs, I realized that we need to escape all the commas and semicolons. The Geoserver docs for SQL Views says: If the values contain semicolons or commas these must be escaped with a backslash (e.g. \, and \;). We can do this using the following JavaScript code: //Function to add replaceAll to Strings String.prototype....


2

Try to disable the "Support on the fly geometry simplification" parameter in the postgis store configuration in GeoServer. And make sure your polygon stays within the "world" boundaries, best if it's not touching the datelines. Also disable "advanced projection handling" in the WMS settings


1

You are giving a zIndex to the basemap with a superior value than the WMS layer, my guess is that's what causing this problem, you should invert the z-indexes basemap : zIndex: 1; WMS layer: zIndex: 2;


1

Caution note: I'm not the writer of the module and I have very little experience with it, but I'm a geotools developer and I've worked on the imagemosaic (non jdbc) module. I believe what you're looking for is currently not possible, and would require changes to the imagemosaic-jdbc store. In particular, it would be useful if the store exposed a CQL ...


1

There were two issues in my requests. The first one was related with the URL. Initially I was using this URL: url = 'http://localhost:8080/geoserver/wfs' Including my_workspace name in the URL is necessary for this WFS-T Insert (according to here): url = 'http://localhost:8080/geoserver/my_workspace/wfs' The second issue was related with the namespace ...


1

You can simply create a CQL filter that combines the elements that you need to select, so: CQL_FILTER=phase=1 AND grade='A' OpenLayers should take care of URL encoding it for you.


1

No - there is no way to push just a dbf file to GeoServer. The easiest way to do it would be to open the file in OpenOffice or Excel and save it as CSV format. Then add the unsupported community csv-datastore to your GeoServer WEB-INF/lib folder.


1

Your CSS looks much too complex (you are drawing squares on top of squares) and not entirely correct either, try something like: * { mark: symbol(square); mark-size: 12px; } :mark [NAME = 'art' ]{ fill: yellow; stroke: yellow; } :mark [NAME = 'stock' ]{ fill: blue; stroke: blue; } Further examples can be found in the css cookbook.


1

I don't think you will find a generic collection of styles available on the internet, since non trivial styles are based on source data attributes, which change by name, type and meaning across similar datasets (e.g., a set of address points could have a single address field with everything, or three fields with a road type, road name, civic number and ...


1

If you still didn't fix your problem, then maybe this might help you: Try to check if all data stores you have are valid (so their sources are available). I had data stores added via Geoserver Web Interface to which I had manually deleted source shp files from the server hdd. So the Geoserver data stores were invalid and the source destinations were ...


1

To access a remote WMS, it is necessary to load it as a store in GeoServer. GeoServer must be able to access the capabilities document of the remote WMS for the store to be successfully loaded. You can't just proxy a layer without creating a store. The easiest way to get the REST file to upload (PUT) is to create the store once by hand (using the normal UI),...


1

the problem could be from the CORS not enabled, if your web page is in a web server not in geoserver, you can either: 1- put your web page in the www folder inside geoserver/data_dir and lauch it from there 2 - or if you need to launch it from a web server ( apache for example ) you will have to enable JSONP in your geoserver configuration like this : go ...


1

Since this is a "large" file your best bet is to style it on the server and use the WMS service to send it to your browser as a small image (i.e. a compressed png). GeoServer uses SLD to style layers, there are many examples available in the SLD cookbook which you can use as a basis for your style. In your case I would recommend using the recode function as ...



Only top voted, non community-wiki answers of a minimum length are eligible