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

Geometry.transformTo should throw error out when point coordinates is error #252

Open
shengzheng1981 opened this issue Jan 25, 2019 · 0 comments

Comments

@shengzheng1981
Copy link

shengzheng1981 commented Jan 25, 2019

code section:

const srs = gdal.SpatialReference.fromEPSG(4326);
layer.features.forEach( item => {
	try{
		const geometry = item.getGeometry();
		geometry.transformTo(srs);
		const feature = model({
			geometry: geometry.toJSON(),
			properties: item.fields.toJSON()
		});
		features.push(feature);
	} catch (e) {
		console.log(e);
	}
});

correct point, everything is ok!
but when point is error, like : "geometry":{"type":"Point","coordinates":[-1.7976931348623157E308,-1.7976931348623157E308]}
no error throw out!! also, code break,cant go through!

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