copyShapefile2RAT not populating RAT

37 views
Skip to first unread message

Alex M. Hamer

unread,
Apr 21, 2017, 6:24:13 AM4/21/17
to RSGISLib Support

Hi,

I am attempting to rasterize a shapefile using copyShapefile2RAT, but once rasterized does not populate the RAT with fields in the shapefile. I've updated RSGISLib in conda, but still having the same issue.

Could anyone help?

Regards,
Alex

Daniel Clewley

unread,
Apr 24, 2017, 4:20:13 PM4/24/17
to Alex M. Hamer, RSGISLib Support
Hi,

Can you provide more details? What platform are you using, version of RSGISLib etc. If you can make the data and code you are using available can try and take a look for you. 

Thanks,

Dan
--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.
Visit this group at https://groups.google.com/group/rsgislib-support.
For more options, visit https://groups.google.com/d/optout.

Alex M. Hamer

unread,
Apr 25, 2017, 6:13:19 AM4/25/17
to RSGISLib Support, alexm...@outlook.com
I'm using MacOS Sierra version 10.12.4 with RSGISLib version 3.2.1338. I get a 'segmentation fault 11' when using copyShapefile2RAT and I've tried removing and reinstalling RSGISLib with no success. I implemented the code on Spectral Differences to copy a shapefile to RAT.

Thanks,
Alex

Nathan Thomas

unread,
Apr 26, 2017, 10:08:08 AM4/26/17
to RSGISLib Support
Hi Alex,

Could you copy and post your code here, so I can take a look?

Cheers, Nathan

Alex M. Hamer

unread,
Apr 26, 2017, 10:30:22 AM4/26/17
to RSGISLib Support
Hi Nathan,

Here's the code I used:

from rsgislib import vectorutils
import rsgislib
  
input_vector = 'training.shp'
rasterised_vector = 'training_raster.kea'
output_rat_image = 'training_RAT.kea'
     
vectorutils.copyShapefile2RAT(input_vector, rasterised_vector, output_rat_image)

Thanks,
Alex

Nathan Thomas

unread,
Apr 26, 2017, 10:36:51 AM4/26/17
to Alex M. Hamer, RSGISLib Support

Hi Alex,

So the code runs, but doesn't populate the attribute table? Do the polygons rasterize OK?

Nathan

--
You received this message because you are subscribed to the Google Groups "RSGISLib Support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-support+unsubscribe@googlegroups.com.
To post to this group, send email to rsgislib-support@googlegroups.com.

Pete Bunting [pfb]

unread,
Apr 26, 2017, 10:50:16 AM4/26/17
to Nathan Thomas, Alex M. Hamer, RSGISLib Support
Hi Alex, 

Can you send me your image and shapefile files so I can test?

Best wishes, 

Pete

****************************************************
* Dr Pete Bunting
* Reader in Remote Sensing
* Earth Observation and Ecosystem Dynamics Group
* Department of Geography and Earth Sciences
* Aberystwyth University
* Aberystwyth
* Ceredigion
* SY23 3DB
* UK

* Ph: +44 (0) 1970 622615
* Mob: +44 (0) 7917 842743
* Email: p...@aber.ac.uk
* ORCID: http://orcid.org/0000-0002-7435-0148
****************************************************
"Please consider the environment before printing this email or any documents attached”

To unsubscribe from this group and stop receiving emails from it, send an email to rsgislib-suppo...@googlegroups.com.
To post to this group, send email to rsgislib...@googlegroups.com.



--------------------------------------------------------------------
Un o’r 4 prifysgol uchaf yn y DU a’r orau yng Nghymru am fodlonrwydd myfyrwyr.
(Arolwg Cenedlaethol y Myfyrwyr 2016)
www.aber.ac.uk

Top 4 UK university and best in Wales for student satisfaction
(National Student Survey 2016)
www.aber.ac.uk
Reply all
Reply to author
Forward
0 new messages