I have not been able to convert my shp file in a obs file with the QGis tool because when i have tried to convert my file the software showed me the next error message:
The message says: Building no. = 0 is of unsupported geometry type-2147483645 (and the software showed me the same message for each polygon of the shp file)
I inserted in the tool the shp file with a height field in the attribute table and a shp point file with another field for the offset parameter. Both files are in the same projection and I have even tried to simplify my polygons in shp format to simple squares, but this didn't work either.
I would be very grateful if someone can provide me a solution...
it seems there is some problem with the detection of the geometry type. There can be many reasons for this. I'll check on monday if I can reproduce the error.
I just tested the plugin to make sure there was no QGIS-update breaking it, but it worked smoothly producing a perfectly fine .obs file.
Are you perfectly sure your file only consists of Polygons or Multi-polygons? The -2147483645 is the answer to a wkbType() request, that is expected to return 3 (for Polygon-Type shapefiles) or 6 (for Multipolygon).
From what you wrote I unfortunately can't tell what went wrong. Maybe you could describe the file and what you did in more detail? Or could you provide me with the file so I can check?
I had the same problem. I was very sure that my shapefiles are polygon-shape files which should be wkbType()==3. when I used wkbType() on my Polygons I got -2147483645 in return. I have no idea why.... I tried the most simple option and replaced line 369 in shp_to_obs.py:
if(thepoly.wkbType() == 3): # if the geometry is a normal polygon
with
if(thepoly.wkbType() == -2147483645): # if the geometry is a normal polygon
I did it just for fun and didnt expect that it would work...but it worked My created OBS-files look fine.
haha, well, that can work for this very file Regina, but?
wait a minute: You're perfectly sure the returned value is -2147483645? That is exactly the same as for DUGR, so it might be systematic! I'll do some research on that and might come up with a new version, that also accepts -2147483645.
Do you know if your shape is of type Polygon, or Multipolygon?
I'm not familiar with GIS-formats. I think it is polygon but I don't understand the difference and haven't seen multipolygon so far. When I check the settings of my shapefile in QGIS i find "polygon" as the geometry type ("Geometrietyp der Objekte dieses Layers")
Your Polygons are of Type Polygon25D (2.5 dimensional polygons). This does not make a lot of difference to the shp_to_obs tool, so i will add QGis.WKBPolygon25D (-2147483645) to the valid geometries.
this might be due to different versions of QGis. No problem. I checked the possible WKB types and added both Polygon25D, as well as MultiPolygon25D. A new version of the plugin was uploaded. However, it might take some time for the repo admins to approve it before it will become visible.