Comments (2)
Looks like there's something in that dataset that is giving gis:create-turtles-inside-polygon
a hard time. The good news for you @EwoutH is that since you want the turtles you are creating to be in the center of the polygon, the old fashioned way of creating turtles from polygons (before I created gis:create-turtles-inside-polygon
) still works for you! Try this for your setup-spots
function:
to setup-spots
;; For each parking space, determine the centroid, convert to x,y coordinates (list with 2 elements),
;; and create a turtle in the center of that polygon
foreach gis:feature-list-of parking-dataset [ this-vector-feature ->
let center gis:centroid-of this-vector-feature
let loc gis:location-of center
if length loc >= 2 [
create-spots 1 [
setxy item 0 loc item 1 loc
set AMENITY gis:property-value this-vector-feature "AMENITY"
]
]
]
end
from gis-extension.
Thanks for getting back! It's a bit less scalable when adding other property-values in the future, but in my case I can get it to work.
I generated my dataset using OpenStreetMap data collected on https://overpass-turbo.eu/, using the query:
[bbox:{{bbox}}];
area
[amenity=parking];
/*added by auto repair*/
(._;>;);
/*end of auto repair*/
out;
In the case anyone wants to debug this.
from gis-extension.
Related Issues (20)
- `gis:link-dataset` and user-defined breed causes crash
- apply-raster and raster-sample generate different results HOT 1
- Exporting with gis:patch-dataset HOT 9
- Scientific e notation not recognized
- Clearer documentation about and/or support for multipart features
- nothing named gis:project-lat-lon defined error HOT 1
- Netlogo 6.2.0 breaks gis:import-wms-drawing
- NetLogo 6.2 Parsing error while loading .asc file HOT 3
- `gis:create-turtles-from-points`: Turtle placed outside of envelope when envelope set to `gis:envelope-of` the dataset in question
- netlogo 6.3 R error HOT 1
- `import-wms-drawing` fails in GIS General Examples model with Internal Server Error (HTTP code 500) HOT 1
- NetLogo let target min-one-of neighbors math operation produced a non-number HOT 1
- gis:find-features always returns partial string matches, StringUtils.matches problem HOT 2
- GIS extension needs to support more grid data formats
- How to Enable GIS Extension to Support Gaussian Projection
- Expose coordinate transformation methods as primitives HOT 1
- Primitives to access world edges
- Add gis:set-property-value primitive
- NetLogo GIS Extension Problem HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gis-extension.