kashif / node-geos

GEOS (Geometry Engine) bindings for Node.js
MIT License
57 stars 21 forks source link

GeoJSON support #8

Closed akidee closed 12 years ago

akidee commented 12 years ago

I can implement it.

kashif commented 12 years ago

would be great! thanks!

akidee commented 12 years ago

Do you consider it important to use the precision model in JSON? I would prefer a simple toJSON(decimalPlaces, bbox?) method that hides a GeoJSONWriter class that is not wrapped by a JS object.

akidee commented 12 years ago

There it is ( #1 ): https://github.com/kashif/node-geos/pull/16

kashif commented 12 years ago

Thanks Andreas! We will review it and merge it soon.

kashif commented 12 years ago

@booo Any feedback on this?

booo commented 12 years ago

I just commented on the pull request. I try too merge this as soon as possible.

As I mentioned in the pull request I would prefer a GeoJSONWriter class with some functions to change the state/output of the write or toGeoJSON function. I can understand that people would like to have some kind of shortcut. So we should also provide a function toGeoJSON for the Geometry.