GEOMETRY_CODE_TO_GEOMETRY_TYPE = {
    -2147483648: "25Bit",
    -2147483648: "25DBit",
    8: "CircularString",
    2008: "CircularStringM",
    1008: "CircularStringZ",
    3008: "CircularStringZM",
    9: "CompoundCurve",
    2009: "CompoundCurveM",
    1009: "CompoundCurveZ",
    3009: "CompoundCurveZM",
    13: "Curve",
    2013: "CurveM",
    10: "CurvePolygon",
    2010: "CurvePolygonM",
    1010: "CurvePolygonZ",
    3010: "CurvePolygonZM",
    1013: "CurveZ",
    3013: "CurveZM",
    7: "GeometryCollection",
    -2147483641: "GeometryCollection25D",
    2007: "GeometryCollectionM",
    3007: "GeometryCollectionZM",
    2: "LineString",
    -2147483646: "LineString25D",
    2002: "LineStringM",
    3002: "LineStringZM",
    101: "LinearRing",
    11: "MultiCurve",
    2011: "MultiCurveM",
    1011: "MultiCurveZ",
    3011: "MultiCurveZM",
    5: "MultiLineString",
    -2147483643: "MultiLineString25D",
    2005: "MultiLineStringM",
    3005: "MultiLineStringZM",
    4: "MultiPoint",
    -2147483644: "MultiPoint25D",
    2004: "MultiPointM",
    3004: "MultiPointZM",
    6: "MultiPolygon",
    -2147483642: "MultiPolygon25D",
    2006: "MultiPolygonM",
    3006: "MultiPolygonZM",
    12: "MultiSurface",
    2012: "MultiSurfaceM",
    1012: "MultiSurfaceZ",
    3012: "MultiSurfaceZM",
    100: "None",
    1: "Point",
    -2147483647: "Point25D",
    2001: "PointM",
    3001: "PointZM",
    3: "Polygon",
    -2147483645: "Polygon25D",
    2003: "PolygonM",
    3003: "PolygonZM",
    15: "PolyhedralSurface",
    2015: "PolyhedralSurfaceM",
    1015: "PolyhedralSurfaceZ",
    3015: "PolyhedralSurfaceZM",
    14: "Surface",
    2014: "SurfaceM",
    1014: "SurfaceZ",
    3014: "SurfaceZM",
    16: "TIN",
    2016: "TINM",
    1016: "TINZ",
    3016: "TINZM",
    17: "Triangle",
    2017: "TriangleM",
    1017: "TriangleZ",
    3017: "TriangleZM",
    0: "Unknown",
}

GEOMETRY_TYPE = {
    "25Bit": -2147483648,
    "25DBit": -2147483648,
    "CircularString": 8,
    "CircularStringM": 2008,
    "CircularStringZ": 1008,
    "CircularStringZM": 3008,
    "CompoundCurve": 9,
    "CompoundCurveM": 2009,
    "CompoundCurveZ": 1009,
    "CompoundCurveZM": 3009,
    "Curve": 13,
    "CurveM": 2013,
    "CurvePolygon": 10,
    "CurvePolygonM": 2010,
    "CurvePolygonZ": 1010,
    "CurvePolygonZM": 3010,
    "CurveZ": 1013,
    "CurveZM": 3013,
    "GeometryCollection": 7,
    "GeometryCollection25D": -2147483641,
    "GeometryCollectionM": 2007,
    "GeometryCollectionZM": 3007,
    "LineString": 2,
    "LineString25D": -2147483646,
    "LineStringM": 2002,
    "LineStringZM": 3002,
    "LinearRing": 101,
    "MultiCurve": 11,
    "MultiCurveM": 2011,
    "MultiCurveZ": 1011,
    "MultiCurveZM": 3011,
    "MultiLineString": 5,
    "MultiLineString25D": -2147483643,
    "MultiLineStringM": 2005,
    "MultiLineStringZM": 3005,
    "MultiPoint": 4,
    "MultiPoint25D": -2147483644,
    "MultiPointM": 2004,
    "MultiPointZM": 3004,
    "MultiPolygon": 6,
    "MultiPolygon25D": -2147483642,
    "MultiPolygonM": 2006,
    "MultiPolygonZM": 3006,
    "MultiSurface": 12,
    "MultiSurfaceM": 2012,
    "MultiSurfaceZ": 1012,
    "MultiSurfaceZM": 3012,
    "NDR": 1,
    "None": 100,
    "Point": 1,
    "Point25D": -2147483647,
    "PointM": 2001,
    "PointZM": 3001,
    "Polygon": 3,
    "Polygon25D": -2147483645,
    "PolygonM": 2003,
    "PolygonZM": 3003,
    "PolyhedralSurface": 15,
    "PolyhedralSurfaceM": 2015,
    "PolyhedralSurfaceZ": 1015,
    "PolyhedralSurfaceZM": 3015,
    "Surface": 14,
    "SurfaceM": 2014,
    "SurfaceZ": 1014,
    "SurfaceZM": 3014,
    "TIN": 16,
    "TINM": 2016,
    "TINZ": 1016,
    "TINZM": 3016,
    "Triangle": 17,
    "TriangleM": 2017,
    "TriangleZ": 1017,
    "TriangleZM": 3017,
    "Unknown": 0,
    "XDR": 0,
}

GEOFORMAT_GEOMETRY_TYPE = {
    'LINESTRING',
    'MULTIPOINT',
    'GEOMETRYCOLLECTION',
    'POINT',
    'GEOMETRY',
    'POLYGON',
    'MULTIPOLYGON',
    'MULTILINESTRING'}
