Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GeoJSON geometry object #14

Open
taviroquai opened this issue May 16, 2016 · 0 comments
Open

GeoJSON geometry object #14

taviroquai opened this issue May 16, 2016 · 0 comments

Comments

@taviroquai
Copy link

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant