I need to geocode address to find the Latitude and Longitude . But I just need the response in XML/JSON format , I don't want to show it on maps. Use of Google Geocoding is prohibited without maps. Please suggest a way to do this.
You can try OpenStreetMap's Nominatim service for example:
http://wiki.openstreetmap.org/wiki/Nominatim
Example output for the following search
http://nominatim.openstreetmap.org/search.php?q=brandenburger+tor%2C+berlin%2C+deutschland&format=json
is
[{"place_id":"67311118","licence":"Data \u00a9 OpenStreetMap
contributors, ODbL 1.0.
http://www.openstreetmap.org/copyright","osm_type":"way","osm_id":"104393803","boundingbox":["52.5159645080566","52.5165634155273","13.3776025772095","13.3781223297119"],"lat":"52.51626405","lon":"13.3777246125974","display_name":"Brandenburger
Tor, Pariser Platz, Berliner Urstromtal, Mitte, Berlin, 11011,
Deutschland, Europ\u00e4ische
Union","class":"tourism","type":"attraction","importance":1.1434728583616,"icon":"http://nominatim.openstreetmap.org/images/mapicons/poi_point_of_interest.p.20.png"}]
Related
Is there a way to get all neighborhoods per city by lat and lng from mapbox API V5.
For example, if I search using the lat and lng of Long Beach.
-118.1937, 33.7701
I expect to get back all the neighborhoods, instead, I only get back one result of
"place_name: "Downtown, Long Beach, California 90802, United States""
I have changed the response limit and bound box, with no results.
Here is the mapbox playground.
https://www.mapbox.com/api-playground/#/forward-geocoding
Thanks!
Mapbox doesn't really do neighborhoods, they require some sort of search data to pull either addresses or places.
However, there are services where you can get neighborhood data. I found this Stack Overflow question to have several links (sadly, most of them outdated....), with the reference to Zillow having a lot of promise.
I'd also suggest the Census Bureau data as it may have what you are looking for, but it is what I would call 'less than user friendly' to find anything - unless you are comfortable reading government spec sort of things... :)
Is there a way of obtaining the type of road an object is settled in from a request via nominatim?
For example
http://nominatim.openstreetmap.org/reverse?format=xml&lat=52.5487429714954&lon=-1.81602098644987&zoom=18&addressdetails=1
does provide me with loads of info. yet, there is no info on the road the address is settled in. would like to obtain something like: rural road or even just grade*N* (where N stands for the level of hierarchy.) i hope what i'm looking for is understandable :) thanks in advance!
Nominatim is for searching addresses, you probably want to use the OverpassAPI to query roads around the given coordinates:
http://overpass.osm.rambler.ru/cgi/interpreter?data=[out:json];way[highway](52.52,-1.82,52.55,-1.81);out;
Then choose the one matching your coordinates the best and look at the highway= value.
You can use format=jsonv2 instead of format=xml or format=json.
format=jsonv2 adds the next fields to response: place_rank,category, type,importance, addresstype.
I added this information to Nominatim Reverse Geocoding documentation.
When category tag contains value highway the type tag shows the road type.
Find more information about highway types at OpenStreetMap highway tag
i want to list all available industries ( like: http://biz.yahoo.com/p/ ) and show all corresponding stocks.
Until now I'm using YAHOO.Finance.SymbolSuggest.ssCallback for the symbol suggestion and http://finance.yahoo.com/d/quotes.csv?s=... for getting the stock's data.
Does anyone have any idea how to get all industries and corresponding stocks?
Is there another hidden Yahoo API?
Lists of all available industries are called GICS Sectors for Standard and Poor's (S&P500 will use that) and ICB for Dow Jones and FTSE. Hence it used by Nasdaq, Nyse and others markets.
It seems like Yahoo uses a third industry classification by Morning Star, but since I'm not quite sure I will give both ways of retrieving data.
Morning Star
I don't know if Yahoo really sticks to this classification, but some names were really close so let's see it:
You need to go to their Index Data and in each sector, click on it and then at the bottom View complete index holdings.
It's not as precise as in Yahoo industry list, but it's all you can do with Morning Star. Not very convincing, I know...
GICS Sectors
GICS Sectors are now a trademark of Standard and Poor's and then data have to be sought for in S&P's website.
Short answer: take a look at this page, you will need to be registered (it's free and easy) and you can download spreadsheets (xls) with stocks and corresponding sectors. Nevertheless, things aren't always easy, and you will have to do a bit of a search to retrieve all stocks with their corresponding industries. For example, the file INDICATED_RATE_CHANGE.xls will give you some companies and their sectors in each month of 2012. Using that and SP500_DividendAristocrats_2012.xls you should be able to retrieve at least a large part of S&P 500 companies.
ICB
ICB is used by NYSE, NASDAQ etc... Then it's a lot simpler than S&P and MorningStar. Here is your answer. BOOM! Direct link!
Link is dead :(
Finally
I strongly advise you to use the simpler and most-used industry classification index: the ICB. It will always be available and publicly displayed since millions of investors relay everyday on it, without having to use S&P financial services or MorningStar brokerage services...
EDIT
You can look at nasdaq.com to retrieve all companies and their corresponding sector: here for Nasdaq and here for Nyse
Get all industry-IDs from here:
http://biz.yahoo.com/ic/ind_index.html
(look at the links)
Then use YQL ( https://developer.yahoo.com/yql/console/ )
with a query like this:
select * from yahoo.finance.industry where id=912
I want to do a server-side check-in. I have the coordinates, which is lat-long; I know the name and street address of the business. Is there a way to get the placeId for the parameter Parameter.with("place", 1234)?
FacebookType publishCheckinResponse = facebookClient.publish("me/checkins",
FacebookType.class, Parameter.with("message", "I'm here!"),
Parameter.with("coordinates", coordinates), Parameter.with("place", 1234)));
If you know the lat-long co-ordinates, why not use Graph API to get the data -
Eg - https://graph.facebook.com/search?type=place¢er=37.76,-122.427&distance=1&access_token=...
This comes from the Graph API doc here - https://developers.facebook.com/docs/reference/api/
How Do I work around a problem with the yahoo map geocode result set? The result set being returned is wrong. The city field contains the city, region and postal code. As seen below.
Is there a way to work around this issue without breaking scalability.
-33.924320
151.187057
203 Coward St
MASCOT NSW 2020
Australia
AU
The Yahoo geoencoding returns usually an XML or a PHP serialized. By querying the encoding service I suppose you already have the address and you want to get the coordinates for your geoPoint. It is possible that you are feeding the maps engine with a wrong request.
If you think you found a bug you can send them an email, but I suggest you to check with other locations or to publish first here your code in order to spot the eventual errors.