Given a geoJSON representation of each US state (such as found here), along with user location coordinates (as available via CLLocationManager), what would be the best way to identify which state is the user in? What is the standard way to parse the geoJSON file, and simply identify which polygons contain the user location?
Let's say my location is in Indiana. I'm looking to create a function that parses the geoJSON representing the US, and identify that the user location only falls within the boundaries of Indiana coordinates.
Any suggestions/tips here is appreciated.
Related
I am working on an iOS app, that scans the room and, convert it to a FML3.0 format.
(FML3.0 is particular format for storing houses/design info in JSON).
I am able to get coordinates of walls using Scenkit/Arkit, but not sure how to get coordinates of area/room.
So, my question is:
Is there any way to form poly under "Areas" section in FML 3.0 using the walls array.
If not, how can I get the coordinates via scanning the room. Any documentation related to this will be helpful.
Thanks!
I have a list of longitude and latitude points for various houses, offices, etc. I am trying to split them up to determine if they are inside a certain Way or not. I don't want to use the old "centre point" of an area and then radius value as that is not accurate enough.
So for example if I had 4 locations in an Way like "Richmond Upon Thames" that looks like this:
It should return just point B and C. Is this possible using Open Street Maps API?
If you like Java, you could load the way as a Polygon and use the JTS (Java Topology Suite) library, or the AWT library to compute whether your points are inside or not.
Here is an example of how the Atlas library uses a combination of both in that specific case. For you it would look like this:
Convert each latitude/longitude pair of the Way to a Location object
Add each Location to a List and create a new Polygon with it
Call the Polygon.fullyGeometricallyEncloses(Location) method on that Polygon with each of the points of interest you have
The Atlas library is available in Maven Central for you to download.
When searching on Zillow using an address, the URL looks like this:
http://www.zillow.com/homes/{Street}", -"{City}," -"{State}" "{PostalCode}_rb/
However, there seems to be no documentation regarding the use of geographic coordinates in such a url.
How to use latitude and longitude instead of an address?
An answer in Can I search Zillow using latitude and longitude coordinates? - Zillow Questions (the 1st Google result on "Zillow search by coordinates") dated 03.2015 gives an example:
http://www.zillow.com/homes/#/homes/for_sale/fsba,fsbo,new_lt/1_pnd/88.769211,-70.092773,-90,-158.686523_rect/3_zm/0_mmm/
Testing shows that only the http://www.zillow.com/homes and /88.769211,-70.092773,-90,-158.686523_rect parts are required.
It's x0,y0,x1,y1 (the direction between the points can be any). (The coordinates in the example are quite strange and specify an area up to the North Pole. More realistic ones are e.g. 53.67068,-71.323242,13.453737,-127.045898_rect.)
Since the last test, the technique stopped working. Moreover, coordinates appear to have vanished from property details as well!
There is no way provided to bring up a specific object by coordinates - they are instead uniquely identified by an ID (ZPID - Zillow Property ID) - and the way to bring up one as of now is e.g. http://www.zillow.com/homedetails/7044216_zpid/.
A possible reason is there's no way to guarantee that coordinates identify anything or identify something uniquely. I.e. coordinates are conceptually a search term rather than a means of identification.
Finally, do keep in mind that all this is undocumented and is subject to change (you can already see one quite-a-change above). They only support API as the means to access their services programmatically.
I have geo data, that contain X field like: 1012532,749 and Y field like: 178774,7655. This data from the shapefile format, but I don`t know in what GEO standart this data is.
Maybe someone know, or can show me the way to find out, how translate this coords in GPS.
From your comment the situation is clear:
You got an invalid shape file:
The prj file states WGS84 coordinates in decimal degrees
which has range: (longitude(x) [-180-.0, 180.0], latitude(y): [-90.0, 90.0].
But the coordinates posted are not in valid range.
The prj definition does not fit to the rest of the shape files (your posted coordinate).
(This happens because the prj file is optional, and has probably the default settings of some other project)
There is little chance of knowing, without further knowlegde.
Simply ask the data provider which geographical datum (name) the coordinates are related to. Further you should claim, that the file is erorrnous and that they should provide a correct prj file (or remove the prj file, if the coordinates are not related to world coordinates)
IF you know the source, e.g the swiss "Landesvermessung" then you could think it is for example a "Swiss Grid CH1903+ / LV95" grid system. (This was an example, the coordinates are not in that Swiss grid)
But it does not make sense to reverse engineer that, just ask the data provider, or if appliable read the info where you have got that data from.
I am trying to use Neighborhood boundaries data(shape files) provide by Zillow.
files available at - http://www.zillow.com/howto/api/neighborhood-boundaries.htm
I am able to read the provided .dbf files but it just have information about state, county, city, name, and region ID.
can some one please guide me to get latitude longitudes or polygon information from this .dbf files or even from shape files.
also how to read the provided shape files?
Use the GetRegionChildren API to get the Lat/Long and other details corresponding to a regionId.