How to use the topojson.mytypes.Types.geometry function in topojson

To help you get started, we’ve selected a few topojson examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github calvinmetcalf / topojson.py / topojson / topology.py View on Github external
def geometry(self,geometry):
            if geometry == None:
                geometry = {}
            else:
                Types.geometry(self,geometry)
            geometry['id'] = id_func(geometry)
            if geometry['id'] == None:
                del geometry['id']
            properties0 = geometry['properties']
            if properties0:
                properties1 = {}
                del geometry['properties']
                for key0 in properties0:
                    if property_transform(properties1, key0, properties0[key0]):
                        geometry['properties'] = properties1
            if 'arcs' in geometry:
                del geometry['coordinates']
            return geometry
    make_topo_inst = make_topo(objects)