Tuesday, June 01, 2010

Rotation in SLD and Esri

In ArcMap you can rotate point symbols geopgraphic and arithmatic. SLD/Geoserver rotates features in only one direction (geographic). So to get the arithmatic rotation in GeoServer (based on a field value) you should multiply the Esri-direction by -1:

<sld:Rotation>
<ogc:Mul>
<ogc:PropertyName>RICHTING</ogc:PropertyName>
<ogc:Literal>-1</ogc:Literal>
</ogc:Mul>
</sld:Rotation>

* <ogc:Mul> is the multiply implementation of SLD (all functions)

To get geographic rotation you have to add 90 degrees.

Friday, January 29, 2010

SLD for GeoServer from QGIS

To be able to publish proprietary formats on the internet using open source techniques, one of the mayor chalanges left is the definition of styling (or export/import of styling from the proprietary system). QGIS not only offers a set of data conversion tools and styling interface, it also contains a mapserver export plugin, with which one can export the styling of a set of layers to mapserver to be published on the internet.

Last year Luca Casagrande launched a SLD export plugin (python). These SLD's can be used to define styling for data published with GeoServer. It's an early version (only supports vector layers with unique values-styling), but it's a great starting point for starting out with SLD and GeoServer. Create styles in QGIS, download the plugin, put it in /qgis/python/plugins and activate it in 'manage plugins' section of QGIS. An 'SLD' button is added to your toolbar, which opens a dialog with the SLD for the styled layers.

For GeoServer there is a great webbased styling tool out there. It's an early version (only firefox 3). The tool is build using GeoExt and uses the GeoServer REST-API (installed as a geoserver plugin) to save the created styles in GeoServer. the tool can not be downloaded with the latest stable geoserver 2.0.2, but it's available with the 2.0.0 version. The styler is also present in the OpenGeo Geo Suite (a suite of opensource GIS applications).

Tuesday, September 15, 2009

upgrade windows xp->2008 &oracle 9->10 (ms4w/gdal)

Today i performed an upgrade on a ms4w/chameleon app from win xp -> 2008 and oracle 9 -> 10 (non-spatial). I met the following difficulties:

Register apache as a service by rightclicking cmd and choose 'run as administrator', next type apache_install

Open up the firewall by running cmd as administrator and typing:
netsh firewall set portopening TCP 80 "Apache Web Server"

I couldn't get the instant oracle client working in combination with odbc, so in the end i installed the full oracle 10.2 client (error 126, could not load translation library)

Next ogrinfo didn't want to show my virtual odbc layer, it appears the table_name should be in capitals in Oracle 10, (ERROR 1: No column definitions found for table 'mpm_gisonline_mv', layer not usable. and Failed to find layer 'xxx' on datasource)

ogrinfo ODBC:user/pw@tns,XXXX (use table_name here to prevent that all tables are scanned at each request)

Friday, May 08, 2009

sld for geoserver from arcgis

There is a (german) tool out there by Albrecht Weiser to create a sld from an arcgis project, it used to be hosted by http://hgis-germany.de (http://web.archive.org/web/20080123212031/arcmap2sld.geoinform.fh-mainz.de/ArcMap2SLDConverter_Eng.htm) but these days it can be found at http://wald.intevation.org/projects/arcmap2sld

Some documentation is provided by vera lindsay:

How to install and use ArcMap2sld:

1. Download v1.2.2 from http://wald.intevation.org/projects/arcmap2sld

2. Download and install Microsoft .NET Framework from here:

http://www.microsoft.com/Downloads/details.aspx?FamilyId=262D25E3-F589-4842-8157-034D1E7CF3A3&displaylang=en

3. Unzip Setup_ArcMap2SLDConverter_1.2.2.zip.

4. To use it open one and only one ArcMap (it lookes for all ArcGIS applications so you can't have catalogue or tools open either).

5. Run /bin/ArcGIS_SLD_Converter.exe. It will default to German so change it to English: Extras>Sprache/Language>English

6. It's prety straight forward from there (at least once you've selected English): select where to save the SLD and other options and click the SLD button on the bottom and whala! Looks like a very nice, clean formated SLD file.


Have a look at http://www.geographie.uni-bonn.de/karto/chapter35_weiserzipf_sld.mobile.pdf

Wednesday, May 06, 2009

map colors

when writing mapserver mapfiles i always tend to choose the wrong colours (even if the mapfile is created from qgis). Today i found this easy webbased tool, colorbrewer, to create and evaluate great colour schemes http://www.personal.psu.edu/cab38/ColorBrewer/ColorBrewer.html