Primary competition visual

Farm Pin Crop Detection Challenge

Helping South Africa
$11 000 USD
Completed (over 6 years ago)
Classification
Earth Observation
1469 joined
42 active
Starti
Mar 04, 19
Closei
Sep 15, 19
Reveali
Sep 16, 19
Train shape file issue
Data · 30 Jul 2019, 14:28 · 2

Hi there - has anyone else experienced an issue with the train shape file? I'm exploring the dataset in SNAP prior to starting and although I can import the test set one fine, the train set one fails to import the vector data and claims an IO Error (null pointer exception) occurred.

Discussion 2 answers

Hey KayJay, yea this is due to some of the farms in the training set being outside the raster of the JEP dumps. This is why we have JEP and JFP dumps.

One way to overcome this is to remove all the farms from the training set which are not inside the bounds of the JEP / JFP images. There are various ways to do this, but the easiest would probably be do reproject the shape file to the same CRS as the raster, and then use geopandas's functions to determine whether a farm's center point is within the bounding box of the raster.

The way I did it was to actually use rasterio's masking functionality, because it returns a ValueError if the polygon is outside the raster bounds.

If you just want to get a feel for SNAP though, try loading in the test set. I think that works.

30 Jul 2019, 16:43
Upvotes 0

Thanks Renier! Really helpful.