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.

I'd like my iPhone app to respond to the device owner with his/her Australian LGA (local government area) name using their lat/long.

I've found this page below with a Shapefile:

http://www.abs.gov.au/AUSSTATS/abs@.nsf/DetailsPage/1259.0.30.001July%202010?OpenDocument

However, on my Windows server I only have MS-SQL and my programmer's preferred language is c#.

Can anyone possibly help with this?

My programmer is having some issues with this task and I am pasting his email below as someone may spot what the issue could be:

Bad News - SharpMap does not implements features we need (Within, Contains e.t.c.) for polygons our map contains. So, I could not write app logic we planned.

Good News - SharpMap loads SHP file more correct then my previous custom application and therefore there is no errors as I see after loading.

To keep moving forward I have found the next way: I fill each separate region using different color. In our case we have more than 500 regions. So, I shift B part in RGB color from 1 to 255, then G part, and then R part after all. So, I will have map like this one (in server memory, not displayed to user):

http://screencast.com/t/xxMtI181z

but more bigger size to avoid errors. Then I will re-calculate user coordinates to map pixel values and determine which pixel color is in that place. Using color value I will get region name from the list of regions (gotten from DBF file).

So, looks like we still can solve this task. I will continue today. My next steps are: bigger image, re-calc coordinates, determine color.

share|improve this question
    
Your programmer describes a clever and effective raster-based way to solve point-in-polygon queries. What kind of help do you need, then? –  whuber Apr 28 '11 at 14:16
    
Which version of MS-SQL? are you using (2008 is best for geo-spatial queries) –  Mapperz Apr 28 '11 at 14:23

2 Answers 2

Can't you simply use point in polygon search?

Something like SELECT dbo.Point_In_Polygon etc, etc.

I'd simply load the coordinates of the polygon to one table and then perform a PiP on that table, using your coordinates.

Unless I have missed a point?

Here's http://www.vb-helper.com/howto_net_point_in_polygon.html a page which shows VB.NET code to do the search, but you do need to know the parts of the polygon

share|improve this answer

This might be a helpful start

http://stackoverflow.com/questions/2537723/iphone-sdk-get-gps-coordinates-from-google-maps

you can use the users location and have google maps locate the overlay (your shapefile in ms-sql) and do an intersect with the location point and polygon (shapefile). Extract the attributes and display the LGA.

share|improve this answer

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.