cnr-isti-vclab / TagLab

A CNN based image segmentation tool oriented to marine data analysis
https://taglab.isti.cnr.it/
GNU General Public License v3.0
74 stars 30 forks source link

Importing Shapefile #40

Open Chris-Cooney opened 2 years ago

Chris-Cooney commented 2 years ago

When attempting to import an shapefile annoted in ArcMap and its associated orthomosaic (.tiff) I receive this notice:

“Georeferencing is not available, please load a georeferenced ortho image”

I have been told this used to be possible and now is a new issue since the most recent TagLab update. Is this process no longer available or is there an error with the method in the way I am attempting to import the files?

maalechene commented 2 years ago

Hi, I have the same problem. When importing a shapefile (created in TagLab via Export as Shapefile), TagLab crashes and I get this error in the command prompt:

ERROR 6: Cannot find coordinate operations from ENGCRS["Local Coordinates (m)",EDATUM[""],CS[Cartesian,2],AXIS["easting",east,ORDER[1],LENGTHUNIT["Meter",1]],AXIS["northing",north,ORDER[2],LENGTHUNIT["Meter",1]]]' toENGCRS["Local Coordinates (m)",EDATUM[""],CS[Cartesian,2],AXIS["easting",east,ORDER[1],LENGTHUNIT["metre",1,ID["EPSG",9001]]],AXIS["northing",north,ORDER[2],LENGTHUNIT["metre",1,ID["EPSG",9001]]]]' Traceback (most recent call last): File "taglab.py", line 3670, in readShapes blob_list = rasterops.read_regions_geometry(self.shapefile_filename, gf) File "C:\Users\jc815475\TagLab-main\source\RasterOps.py", line 129, in read_regions_geometry transformed.Transform(reproject) File "C:\Users\jc815475\Anaconda3\envs\env_taglab\lib\site-packages\osgeo\ogr.py", line 7652, in Transform return _ogr.Geometry_Transform(self, args) NotImplementedError: Wrong number or type of arguments for overloaded function 'Geometry_Transform'. Possible C/C++ prototypes are: OGRGeometryShadow::Transform(OSRCoordinateTransformationShadow ) OGRGeometryShadow::Transform(OGRGeomTransformerShadow *)

Thank you

maalechene commented 2 years ago

Hi, I tried to work around the problem by exporting my annotations as Labeled Image and that way it works, however when doing this I loose the initial colony ID. It seems that TagLab reassign the IDs by top to bottom-left to right order. Is there ant way the IDs can be kept the same? Thank you

maxcorsini commented 2 years ago

Hi,

the georeferencing information are read from GeoTiff. If your image is not a Geotiff TagLab is not able to retrieve them.

For maalechen, regarding the importing of shapefile, it seems that one of the information present in the Shapefile is not supported by TagLab. In order to better understand the problem, please, contact us by email and send us the shapefile so that we can take a look at solve the problem.

I am happy that the workaround works, but it is not possible to reassign the same IDs during the importing of a labeled image.

Best

orionsmcc commented 1 year ago

Hi all,

Have there been any changes in TagLab's ability to load shapefiles since the last post? I am hoping to load shapefiles (colony borders that were traced in ArcGIS) into TagLab but am getting the same error “Georeferencing is not available, please load a georeferenced ortho image”. The shapefiles in question contain attribute data for each colony (colony ID numbers and bleaching scores) so unfortunately the option of loading a labeled image wouldn't work since we would lose this attribute data.

Were you able to solve the similar problem that maalechene raised in June?

Thanks in advance! Orion