Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer 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

share|improve this answer
    
what about projections? accurate distance calculations? those are important tools. –  George Dec 21 '11 at 15:35
    
What about them? Can't they be done in math? –  Hairy Dec 26 '11 at 20:30
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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