Error with loading GIS layers

432 views
Skip to first unread message

vidus...@gmail.com

unread,
Mar 9, 2021, 10:31:01 PM3/9/21
to netlogo-users
Hi All 

Apologies for asking too many questions but I am running close to my deadline and I need help at many steps in my model. 

I want to create my model environment based on raster dataset and also want to include a road shapefile for the agets to move around the landscape. 

I have successfully loaded both raster and vectors in the file before but in geographic coordinate system. But the roads lines appear to be not matching the extent of raster and a little offsite. Both raster and vector have the same projection but not sure why this is happening. 

I am trying to change them to  projected coordinate system and see if it works. For this I projected them in ESPG 32750, I did download .prj file from the link provided (WKT) , try set projection and load-coordinate-system commands but I am getting errors. 

Extension exception: Java heap space
error while observer running GIS:LOAD-DATASET
  called by procedure SETUP
  called by Button 'Setup'

It was working befor with 12 raster datasets and a road dataset. What am I doing wrong now? 

Is it NetLogo's limitation to work with large dataset?  
I am already running a seperate model for species distribution in my study area, output of which will be used to create environment in ABM. Would it be too big if I want to combine these two models at any point in future? Should I switch to some other ABM programms?

I badly need help here please.

Kind Regards

Vidushi  

James Hovet

unread,
Mar 11, 2021, 4:48:15 PM3/11/21
to netlogo-users
Hello Vidushi,

A few things I would try:

first, consult this page on how to up the RAM that NetLogo can use. If it is just a simple problem of too much data GIS loaded in at once, then upping the RAM limit (a fairly modest 1 gigabyte by default) might help.

second, for the more GIS specific problem of the raster and shapefiles not quite lining up: do they line up if you open them in a dedicated GIS program like QGIS or is it just an issue when you open them up in NetLogo? When datasets are imported into NetLogo, they are all converted from their projections into an internal representation and then reprojected when displayed, so I don't think that the out-of-alignment issue is likely to be fixed by displaying the data in a different projection.

If adding more RAM doesn't solve the issue, it would be useful if you could reply with the full error message you get (you can see the full message with "Show internal details" on the error message pop up) and your full dataset-loading code.

Best,
James Hovet

Vidushi Patel

unread,
Mar 11, 2021, 11:28:20 PM3/11/21
to James Hovet, netlogo-users
Hi James 

It seems that I am able to fix the second issue in my working version of model by just changing max-pxco max-pycor to 100 and patch size 2. It does look that they are not out of space but still there are some resource patches that do not seem to be connected with roads. They look fine in QGIS. I think its something to so with cellsize and I am putting some more work in to get this corrected. With this, Is there a thumb rule that we need to understand about matching world extent to gis extent?  I found few different ways one of which involve matching xy coordinates to raster path and row which I think with this large data not possible to include. 

Java error was probably causing due to heaps of space being taken over by reprojected files and .prj files that I have downloaded to read projections (this is wierd though, haven't noticed this before). Thank you for your suggestion regarding memory, I will definetly do that. No error for now but, it does give memory error if I set world envelop to roads shapefile rather than one of the resources raster. I dont know why?   

I actually want my agets to move around the landscape along the roads chasing resource availability and calculate travel distance for each trip (each run = 1 year). Also there are some proximity measures e.g. one of the agent type only prefers to move within 200k from its home location, agents can only acquire patch that is at least 3 km apart etc. I know this in GIS byt not sure how can I get these distance measures in NetLogo. That is why I need to understand the concept behind world matching which is not clear to me till date. 

Can anyone explain me please?   

Many thanks and kind regards


Vidushi


--
You received this message because you are subscribed to the Google Groups "netlogo-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netlogo-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netlogo-users/5f962360-cb1d-41a4-b011-07ffa167f55an%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages