0

Having seen the answer to the smallest GIS library for embedded devices, I'm asking a related question. I want to do simple point-in-polygon and other spatial relationship tests against a shapefile. But I also want to invoke REST calls and so I just don't want to be using low-level C/C++ style languages because...well, they're painful.

Also, the device can run Windows Embedded or Linux Embedded, but preferably the solution will work on either.

1 Answer 1

1

The easiest way, to do a point in polygon, is mathematically; you don't actually need to invoke any GIS (which always has an overhead), all you need to do, is use something like Java script to calculate if a given point is within a given set of co-ordinates, which make up a polygon. I think I may even have soem java code somewhere we can be, very, easily rtranslated into Javascript, which needs you to pass ina string of polygon coords and the point coords. Always, always, try and keep things away from a GIS if they can be computed mathematically, as all you are going to do, is invoke a middle man, to do the same things, which cost time and money and, after all, a computer is best at crunching numbers.

That's my opinion anyway. I'll mooch through my libs later to see if I can find it, but, essentially, it is quite a simple mathematical issue

EDIT I found this very easily:

Point in Polygon

And also this:

Google Point in Polygon

Either way, much better do this the first way using Math

2
  • what about projections? accurate distance calculations? those are important tools. Commented Dec 21, 2011 at 15:35
  • What about them? Can't they be done in math?
    – Hairy
    Commented Dec 26, 2011 at 20:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.