Skip to content

GeoJSON geometry object #14

@taviroquai

Description

@taviroquai

Hi,

I'm adding the following code to convert to GeoJSON object:

$wkbNames = ['POINT', 'LINESTRING', 'POLYGON'];
$geojsonNames = ['Point', 'LineString', 'Polygon'];
$feature['geometry'] = $parser->parse($wkb);
$feature['geometry']['type'] = str_replace($wkbNames, $geojsonNames, $feature['geometry']['type']);
$feature['geometry']['coordinates'] = $feature['geometry']['value'];
unset($feature['geometry']['srid']);
unset($feature['geometry']['value']);

It could be possible to implement conversion to GeoJSON geometry object?

Thanks :)

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