Skip to content

Make 'name' the default for 'crs_type' #117

@henri-hulski

Description

@henri-hulski

Despite the docs link is still the default for the crs_type option.

You need to fix def get_crs(self):

    def get_crs(self):
        crs = {}
        crs_type = self.options.pop('crs_type', None)
        properties = {}
        if crs_type == "name":
            # todo: GeoJSON Spec: OGC CRS URNs such as "urn:ogc:def:crs:OGC:1.3:CRS84" shall be preferred over legacy identifiers such as "EPSG:4326":
            properties["name"] = "EPSG:%s" % (str(self.srid))
        else:  # preserve default behaviour
            crs_type = "link"
            properties["href"] = "http://spatialreference.org/ref/epsg/%s/" % (str(self.srid))
            properties["type"] = "proj4"
        crs["type"] = crs_type
        crs["properties"] = properties
        return crs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions