I have an aerial photo which consists of 2 files (.jp2, j2w) and i want to perform a segmentation.

To be exact, i can't upload the 2 files with r.in.gdal because it says that the data file cannot be supported but in order to do segmentation (i.segment) it requires to do a group with these files, with i.group.

The question is what to do with the files in order to do group and segmentation.

1 Answer 1


Can you provide some more information? What version of GRASS? What Operating System (win/Mac/Linux)?

You import problem could be related to your GDAL installation. If it wasn't compiled with .jp2 support, you won't be able to import it.

You can check if you have jpg2000 support by running this on a terminal:

gdalinfo --formats

and looking for outputs like:

JP2ECW (rov): ERDAS JPEG2000 (SDK 5.0)
JP2OpenJPEG (rwv): JPEG-2000 driver based on OpenJPEG library

If you don't have jpeg2000 support, you will need to install the drivers. The information here can be helpful: http://www.gdal.org/frmt_jp2ecw.html

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.