Friday, October 1, 2010

Animal Movement and Home Range Options for ArcGIS

The Animal Movement Extension was written in Avenue, and development stopped many years ago. Therefore, Animal Movement Extension is not available for ArcGIS 9.x or 10.

There are a couple of options if you'd like to move forward with ArcGIS

  • A lot of people using Animal Movement extension migrated to Hawths Tools, to be able to use ArcGIS. Hawths tools offered many of the functions in Animal Movement, though Hawths tools is also now a discontinued project, and will not work with newer versions of ArcGIS (9.2 was the last version it worked with).
  • Hawths tools has been been merged into the Geospatial Modeling Environment, which works with ArcGIS 10. You can download this and find more info at: http://www.spatialecology.com/gme/
  • Home Range Tools for ArcGIS works on ArcGIS 9.x, and is available at http://nhsbig.inhs.uiuc.edu/wes/home_range.html
  • There is a lot of work going on with Agent Based modeling right now. I met with an agent based modeling working group at the ESRI conference. They've developed an extension for ArcGIS based on repast called Agent Analyst: http://www.institute.redlands.edu/agentanalyst/ . I didn't hear about any scenarios involving wildlife movement, buy there is a book coming out, and I would assume those scenarios might be discussed. I'll keep my ear to the ground on this one
  • There are also contributed and native tools and scripts that could be used to perform many of these functions if strung together in the right order
Other Resources

Wednesday, September 29, 2010

Geoserver SLD Polygon Labels Repeat

Fix: had specified larger tile size for earlier debugging. Switch tilesize back to 256 to fix label repeat on polygons.

Tuesday, September 28, 2010

FIX! Geoserver not displaying labels

I've been having an extremely frustrating problem over the last month ... in one word: labeling. My latest labeling challenge, was that Geoserver refused to show labels for many buildings. I tried all kinds of things ... isolating the buildings layer, checking my query order, changing conflicts/overlap options ... pretty much anything I could think of to get labels to display.

Finally, I figured it out! There is an obscured parameter in older ('stable') versions of Geoserver, which was finally exposed through SLD vendorOption in the latest release of Geoserver/Geotools. This parameter MIN_GOODNESS_FIT is used when labeling polygons in particular. Based on MIN_GOODNESS_FIT geotools determines if From geoserver docs:

Geoserver will remove labels if they are a particularly bad fit for the geometry they are labeling.

The label is sampled approximately at every letter. The distance from these points to the polygon is determined and each sample votes based on how close it is to the polygon

so labels are removed if letters are beyond a certain threshold from the polygon. That meant that small buildings (especially ones with longish names) would never be labeled.

However, in Geoserver 2.1 the SLD VendorOption "goodnessOfFit" is exposed

Syntax follows this example:

0.3

the default value is 0.5, so anything lower will allow more lables to be placed.


Issue discussion:



Thursday, September 16, 2010

Geoserver WebTileCache

I was ultimately not able to deal with cutoff labels in Mapnik (or labels not being placed because of tile/overlap issues), so I went with Geoserver for the UD campus map project. The WebTileCache automatically tilecaches all services ... only challenge is to use SLD for styling.

Friday, August 27, 2010

Mapnik label cut off strategies

I've been spending a lot of time dealing with mapnik labels/shields being cut off. Here are some strategies:

  1. change the "buffer_size" property of the map object in the mapnik xml ... you can also direclty change this in generate_tiles.py (which comes with osm mapnik package). I don't think the mapnik xml was being read in my case. When I changed the line self.m.buffer_size to = 0, my cutoff problems disappear
  2. you'll need to do some tweaking with the order layers are defined within mapnik/cascadenik
  3. also tweaking of text-allow-overlap and text-avoid-edges (these are cascadenik properties, there are similarly named ones for mapnik alone)
  4. you may need to merge segments of the same road
To sum up: my strategy was first getting all my ordering straightened out with how layers are defined/ordered within mapnik/cascadenik. I then turned most layers to text-avoid-edges and text-allow-overlap to true. I set the buffer value to 0 in the .py file that I was using to render my tiles (in the osm package). Then moving around stuff that overlapped badly and will possibly need to merge segments of the same road.

Tuesday, August 10, 2010

ImportError: No module named mapnik

I'm still not sure what exactly causes this error: "ImportError: No module named mapnik" .. clearly Python is not finding the mapnik bindings, but why?  I think it might be related to a new install of ArcGIS, which installs a new version of Python.  I am also trying to figure out how exactly to fix this.  Recently I relaunched "cmd" and that worked.

Thursday, July 29, 2010

python zipfile.py MemoryError

Was getting the following error on zipfile.py (actually while attempting to run a cascadenik script):
newdata = self.dc.decompress(newdata)
MemoryError

I fixed this error by changing the compression algorithm that my .zip was being created with to "STORE" (i.e. no compression).