You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently, I have been trying to convert a GeoJSON file to an OSM file using ogr2osm, and also learn more about ogr2osm.
I am following the hints in #36 to extract the elevation of points, but I noticed an inconsistency, as shown below:
classTestTranslation(ogr2osm.TranslationBase):
deffilter_feature(self, ogrfeature, layer_fields, reproject):
geom_name=ogrfeature.GetGeometryRef().GetGeometryName()
# can show e.g. LINESTRINGgeom_type=ogrfeature.GetGeometryRef().GetGeometryType()
# always 0, which seemingly does not correspond to any of the OGRwkbGeometryType values
Is it normal to have geometry type to be always 0 when I am reading from a GeoJSON?
The text was updated successfully, but these errors were encountered:
classTestTranslation(ogr2osm.TranslationBase):
deffilter_feature(self, ogrfeature, layer_fields, reproject):
geom_name=ogrfeature.GetGeometryRef().GetGeometryName()
print("name: %s"%geom_name)
# can show e.g. LINESTRINGgeom_type=ogrfeature.GetGeometryRef().GetGeometryType() +2**32# convert to unsigned# always 0, which seemingly does not correspond to any of the OGRwkbGeometryType valuesprint("type: %d"%geom_type)
Resulting in
name: LINESTRING
type: 2147483650
where 2147483650 corresponds to wkbLineString25D (I added the third dimension to all coordinates to investigate another issue)
Did you find out where the 0 came from? Was it due to the necessary conversion to an unsigned int or a wrong format while printing? Something with the input file which wasn't correct?
Recently, I have been trying to convert a GeoJSON file to an OSM file using
ogr2osm
, and also learn more aboutogr2osm
.I am following the hints in #36 to extract the elevation of points, but I noticed an inconsistency, as shown below:
Is it normal to have geometry type to be always 0 when I am reading from a GeoJSON?
The text was updated successfully, but these errors were encountered: