NetLogo / NetLogo/GIS-Extension

apply-raster and raster-sample generate different results

Open
#13 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
36
Forks
23
PR merge metrics
No merged PRs in 30d

Description

I think I found a bug in gis:apply-raster. I'm using NetLogo v5.2.1
For a long time I have been having trouble aligning my raster data and my shape files in NetLogo using the GIS extension. When I import the raster and assign values using gis:apply-raster, I usually end up with a border along the bottom and right side of the view filled with NaN. My rasters are displaced (upward and to the left) by this same margin when compared to my vectors. (the *.shp and *.asc files align perfectly in QGIS).
However, when I cycle gis:raster-sample across each patch in view, the entire raster shifts down and to the right, filling the NaN margins and aligning perfectly with the shape files.

Tom

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the discrepancy in NetLogo v5.2.1 by comparing gis:apply-raster with cycling gis:raster-sample across each patch, using raster and shape files that align in QGIS. Trace why the two operations produce different offsets and NaN borders; done when both produce the same alignment without the border.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.