Received geo data of Riyadh traffic from HERE api as shape points, how to load them into geopandas? - geospatial

I'm new to geospatial data, and I've collected some traffic flow data of Riyadh using HERE API by using this request url:
requests.get(f"https://data.traffic.hereapi.com/v7/flow?locationReferencing=shape&in=bbox:46.278534,24.377121,47.040710,25.084355&advancedFeatures=deepCoverage&apiKey={HERE['apikey']}")
they have 3 ways of describing a location, check here: https://developer.here.com/documentation/traffic-api/dev_guide/topics/concepts/location-referencing.html, and the only one that shows coordinates in the response is Shape Points.
I need the response with coordinates in order to manipulate and visualize the data using geopandas and add more data to every linestring. however, the response goes something like this:
> {"sourceUpdated": "2022-10-06T14:28:08Z", "results": [{"location": {"description": "\u0634\u0627\u0631\u0639
> \u0627\u0644\u0634\u064a\u062e \u062e\u0644\u064a\u0641\u0629
> \u0628\u0646 \u0623\u062d\u0645\u062f \u0622\u0644
> \u062b\u0627\u0646", "length": 288.0, "shape": {"links": [{"points":
> [{"lat": 24.82835004106164, "lng": 46.88801002688706}, {"lat":
> 24.828669978305697, "lng": 46.887639965862036}], "length": 52.0}, {"points": [{"lat": 24.828669978305697, "lng": 46.887639965862036},
> {"lat": 24.828799981623888, "lng": 46.88746998086572}], "length":
> 22.0}, {"points": [{"lat": 24.828799981623888, "lng": 46.88746998086572}, {"lat": 24.829199966043234, "lng": 46.886930018663406}], "length": 70.0}, {"points": [{"lat": 24.829199966043234, "lng": 46.886930018663406}, {"lat": 24.82987998984754, "lng": 46.88601999543607}], "length": 119.0}, {"points": [{"lat": 24.82987998984754, "lng": 46.88601999543607},
> {"lat": 24.830019967630506, "lng": 46.885829977691174}], "length":
> 25.0}]}}, "currentFlow": {"speed": 8.333334, "speedUncapped": 8.333334, "freeFlow": 9.722222, "jamFactor": 0.6, "confidence": 0.71, "traversability": "open"}}, {"location": {"description":
> "\u0634\u0627\u0631\u0639 \u0627\u0644\u0635\u062d\u0627\u0628\u0629",
> "length": 1103.0, "shape": {"links": [{"points": [{"lat":
> 24.803550001233816, "lng": 46.769810020923615}, {"lat": 24.803940011188388, "lng": 46.770779974758625}], "length": 107.0}, {"points": [{"lat": 24.803940011188388, "lng": 46.770779974758625},
> {"lat": 24.804060040041804, "lng": 46.77109002135694}, {"lat":
> 24.804279981181026, "lng": 46.77162000909448}], "length": 93.0}, {"points": [{"lat": 24.804279981181026, "lng": 46.77162000909448},
> {"lat": 24.804349970072508, "lng": 46.77179996855557}], "length":
> 20.0}, {"points": [{"lat": 24.804349970072508, "lng": 46.77179996855557}, {"lat": 24.80441995896399, "lng": 46.771959979087114}], "length": 18.0}, {"points": [{"lat": 24.80441995896399, "lng": 46.771959979087114}, {"lat": 24.80476001277566, "lng": 46.77283002063632}], "length": 96.0}, {"points": [{"lat": 24.80476001277566, "lng": 46.77283002063632},
> {"lat": 24.80492999777198, "lng": 46.77323997952044}], "length":
> 45.0}, {"points": [{"lat": 24.80492999777198, "lng": 46.77323997952044}, {"lat": 24.805459985509515, "lng": 46.77444001659751}], "length": 135.0}, {"points": [{"lat": 24.805459985509515, "lng": 46.77444001659751}, {"lat": 24.805540032684803, "lng": 46.77461000159383}], "length": 19.0}, {"points": [{"lat": 24.805540032684803, "lng": 46.77461000159383},
> {"lat": 24.805650003254414, "lng": 46.77487998269498}], "length":
> 30.0}, {"points": [{"lat": 24.805650003254414, "lng": 46.77487998269498}, {"lat": 24.805780006572604, "lng": 46.77513001486659}], "length": 29.0}, {"points": [{"lat": 24.805780006572604, "lng": 46.77513001486659}, {"lat": 24.805840020999312, "lng": 46.77526001818478}], "length": 15.0}, {"points": [{"lat": 24.805840020999312, "lng": 46.77526001818478},
> {"lat": 24.806040013208985, "lng": 46.77575002424419}], "length":
> 54.0}, {"points": [{"lat": 24.806040013208985, "lng": 46.77575002424419}, {"lat": 24.806360034272075, "lng": 46.7765299603343}], "length": 86.0}, {"points": [{"lat": 24.806360034272075, "lng": 46.7765299603343}, {"lat": 24.80663001537323, "lng": 46.777179976925254}], "length": 72.0}, {"points": [{"lat": 24.80663001537323, "lng": 46.777179976925254},
> {"lat": 24.807410035282373, "lng": 46.77894998341799}], "length":
> 198.0}, {"points": [{"lat": 24.807410035282373, "lng": 46.77894998341799}, {"lat": 24.807629976421595, "lng": 46.77946999669075}], "length": 58.0}, {"points": [{"lat": 24.807629976421595, "lng": 46.77946999669075}, {"lat": 24.80772997252643, "lng": 46.77972002886236}], "length": 28.0}]}}, "currentFlow": {"speed": 8.611112, "speedUncapped": 8.611112,
> "freeFlow": 10.555556, "jamFactor": 1.7, "confidence": 0.94,
> "traversability": "open", "subSegments": [{"length": 819.0, "speed":
> 10.277778, "speedUncapped": 10.277778, "freeFlow": 10.0, "jamFactor": 0.0, "confidence": 0.94, "traversability": "open"}, {"length": 284.0, "speed": 6.111111, "speedUncapped": 6.111111, "freeFlow": 11.388889,
> "jamFactor": 3.1, "confidence": 0.94, "traversability": "open"}]}},
> {"location": {"description": "\u0634\u0627\u0631\u0639
> \u0627\u0644\u0628\u0631\u0642", "length": 180.0, "shape": {"links":
> [{"points": [{"lat": 24.808140015229583, "lng": 46.886649979278445},
> {"lat": 24.808549974113703, "lng": 46.88592997379601}], "length":
> 86.0}, {"points": [{"lat": 24.808549974113703, "lng": 46.88592997379601}, {"lat": 24.80871995911002, "lng": 46.885659992694855}], "length": 33.0}, {"points": [{"lat": 24.80871995911002, "lng": 46.885659992694855}, {"lat": 24.808839987963438, "lng": 46.885469974949956}], "length": 23.0}, {"points": [{"lat": 24.808839987963438, "lng": 46.885469974949956},
> {"lat": 24.808960016816854, "lng": 46.88526998274028}], "length":
> 24.0}, {"points": [{"lat": 24.808960016816854, "lng": 46.88526998274028}, {"lat": 24.809030005708337, "lng": 46.88516001217067}], "length": 14.0}]}}, "currentFlow": {"speed": 5.277778, "speedUncapped": 5.277778, "freeFlow": 8.055555, "jamFactor": 2.5, "confidence": 0.9, "traversability": "open"}},
> {"location": {"description": "\u0634\u0627\u0631\u0639
> \u0627\u0644\u0646\u062f\u0648\u0629", "length": 19.0, "shape":
> {"links": [{"points": [{"lat": 24.80036001652479, "lng":
> 46.892340034246445}, {"lat": 24.800450038164854, "lng": 46.8921800237149}], "length": 19.0}]}}, "currentFlow": {"speed": 7.777778, "speedUncapped": 7.777778, "freeFlow": 7.777778, "jamFactor": 0.0, "confidence": 0.84, "traversability": "open"}}, ...
> ] }
correct me if I'm wrong, it is a messy data that needs post processing manually in order to have it supported by geopandas -fiona drivers- which are:
{'ARCGEN': 'r', 'DXF': 'rw', 'CSV': 'raw', 'OpenFileGDB': 'r',
'ESRIJSON': 'r', 'ESRI Shapefile': 'raw', 'FlatGeobuf': 'rw',
'GeoJSON': 'raw', 'GeoJSONSeq': 'rw', 'GPKG': 'raw', 'GML': 'rw',
'OGR_GMT': 'rw', 'GPX': 'rw', 'GPSTrackMaker': 'rw', 'Idrisi': 'r',
'MapInfo File': 'raw', 'DGN': 'raw', 'PCIDSK': 'raw', 'OGR_PDS':
'r', 'S57': 'r', 'SQLite': 'raw', 'TopoJSON': 'r'}
I really would be happy if you show me a way that I can get the data in any supported format, or preferably in geojson.
and another question, is their location referencing static? I mean, for every time I request the traffic data, do I get the same segments of roads but with different traffic data or does the segmentation change depending on traffic?
Thank you!

The HERE apis are returning the data in the JSON format. The data should be processed at application level based on the use-case.
And the answer to second query related to segments and traffic. The Segments will not change, only the traffic data will be updated.

Related

Nothing happens in Terminal when I run a Python script

I'm a Python noob but with the help of Google + GPT I'm trying to run a script on my M1 Mac (12.4), but nothing is happening at all.
I don't know if this matters, but I'm running python3. When I type in 'which python3' in Terminal I get this response:
/Library/Frameworks/Python.framework/Versions/3.11/bin/python3
I type 'python3' and then paste the location of my .py file (/Users/myusername/Documents/file.py) and hit enter but nothing happens at all.
Top line is where I type 'python3 + pathname of .py file
The python script should be subtracting 600 from the 'end' field for each 'job' (but not for 'depots') if that job has a 'job_type' of AA or BB in all .json files in my Documents folder.
Here is the content of the .py file:
import os
import json
# Path to the folder containing the json files
folder_path = '/Users/myusername/Documents/'
# Loop through all the files in the folder
for filename in os.listdir(folder_path):
# Check if the file is a json file
if filename.endswith('.json'):
# Open the file and read its contents
with open(os.path.join(folder_path, filename), 'r') as json_file:
data = json.load(json_file)
# Loop through the jobs array
for job in data['jobs']:
# Check if the job type is "AA" or "BB"
if job['job_type'] in ["AA", "BB"]:
# Subtract 600 from the end field
job['end'] -= 600
# Write the modified data back to the file
with open(os.path.join(folder_path, filename), 'w') as json_file:
json.dump(data, json_file, indent=4)
And here is an example of one of the .json files in the folder.
{
"zone": {
"zone_id": D,
"end_time": 60000
},
"depots": [
{
"depot_id": 4,
"lat": -87.600738,
"lng": 41.788975,
"start": -3600,
"end": 10096,
"label": "Label1",
"packing_time": 600,
"depot_type": "AA"
},
{
"depot_id": 3,
"lat": -84.390186,
"lng": 33.749178,
"start": -3600,
"end": 10696,
"label": "Label1",
"packing_time": 600,
"depot_type": "BB"
}
],
"jobs": [
{
"job_id": 1,
"depot_id": 4,
"lat": 37.802334,
"lng": -122.417907,
"status": "ready",
"label": "A1A2",
"order_placed": 1800,
"start": -960,
"end": 5340,
"pickup_eta": null,
"dropoff_eta": null,
"volume": null,
"products": [],
"job_type": "AA",
"service": 240
},
{
"job_id": 31,
"depot_id": 3,
"lat": 37.802334,
"lng": -122.417907,
"status": "ready",
"label": "B1B2",
"order_placed": 1800,
"start": -960,
"end": 5340,
"pickup_eta": null,
"dropoff_eta": null,
"volume": null,
"products": [],
"job_type": "BB",
"service": 240
}
{
"job_id": 31,
"depot_id": 3,
"lat": 37.802334,
"lng": -122.417907,
"status": "ready",
"label": "C1C2",
"order_placed": 1800,
"start": -960,
"end": 5340,
"pickup_eta": null,
"dropoff_eta": null,
"volume": null,
"products": [],
"job_type": "CC",
"service": 240
}
],
"drivers": [
{
"driver_id": 1,
"lat": 37.4767822,
"lng": -122.261175,
"status": "ready",
"time_until_completion": null,
"label": "Name1",
"assigned_jobs": [],
"depot_id": null,
"capacity": null
},
{
"driver_id": 1,
"lat": 37.4767822,
"lng": -122.261175,
"status": "ready",
"time_until_completion": null,
"label": "Name2",
"assigned_jobs": [],
"depot_id": null,
"capacity": null
}
]
}

Is there a easier way to make a relationship with "compound keys" in Model?

My code..
ADONIS V4
With the code below I can generate exactly what I want as an output but I think I'm doing it the wrong way. I didn't find anything related on any forum, I believe I don't know what I'm looking for
var results = await ReboxSurplus.query()
.where(function () {
if (state) this.where("state", state);
if (city) this.where("city", city);
})
.with('port')
.fetch();
for (const row of results.rows) {
row['prices'] = await ReboxPrice.query().where('state', row.state).where('city', row.city).where('port_car_id', row.port_car_id).fetch()
}
My output..
The json I would like to obtain is exactly this, I believe that the solution would be to forget about this "enhancement" directly in the model, can someone help me?
{
"id": 29305,
"port_car_id": 1,
"state": "RJ",
"city": "Rio de Janeiro",
"rebox_commission": 0,
"created_at": "2020-12-22 18:43:03",
"updated_at": "2020-12-22 18:43:03",
"prices": [
{
"id": 890641,
"price": 125,
"km": 10,
"per_km": 1.5,
"commission": 40,
"created_at": "2020-12-21 13:59:59",
"updated_at": "2020-12-21 13:59:59",
"port_car_id": 1,
"state": "RJ",
"city": "Rio de Janeiro"
},
{
"id": 890642,
"price": 140,
"km": 20,
"per_km": 1.5,
"commission": 40,
"created_at": "2020-12-21 13:59:59",
"updated_at": "2020-12-21 13:59:59",
"port_car_id": 1,
"state": "RJ",
"city": "Rio de Janeiro"
},
{
"id": 890643,
"price": 160,
"km": 40,
"per_km": 1.5,
"commission": 40,
"created_at": "2020-12-21 13:59:59",
"updated_at": "2020-12-21 13:59:59",
"port_car_id": 1,
"state": "RJ",
"city": "Rio de Janeiro"
}
],
"port": {
"id": 1,
"port": "Carro de Passeio",
"percent_value": 40,
"percent_extra": 0,
"created_at": "2020-11-12 16:02:46",
"updated_at": "2020-11-12 16:02:46",
"state": null,
"city": null
}
},

Deserialize json in adonis

i have this two arrays of objects:
bookUnitIdInformacoes
[
{
"id": 5,
"book_id": 33,
"unit": 1,
"sequence": 1,
"description": "UNIT_01_GRAMMAR",
"qt_question": 5,
"status": false,
"user_id": 1,
"created_at": "2019-12-27 08:11:21",
"updated_at": "2019-12-30 14:54:12",
"miniature": null
},
{
"id": 6,
"book_id": 33,
"unit": 1,
"sequence": 2,
"description": "UNIT_01_VOCABULARY",
"qt_question": 5,
"status": false,
"user_id": 1,
"created_at": "2019-12-27 08:11:39",
"updated_at": "2019-12-27 08:11:39",
"miniature": null
},
{
"id": 7,
"book_id": 33,
"unit": 2,
"sequence": 1,
"description": "UNIT_02_GRAMMAR",
"qt_question": 5,
"status": false,
"user_id": 1,
"created_at": "2019-12-27 08:11:46",
"updated_at": "2019-12-27 08:11:46",
"miniature": null
},
{
"id": 8,
"book_id": 39,
"unit": 1,
"sequence": 1,
"description": "UNIT_01_GRAMMAR",
"qt_question": 5,
"status": false,
"user_id": 1,
"created_at": "2019-12-30 11:07:09",
"updated_at": "2019-12-30 15:03:50",
"miniature": null
}
]
and idioma:
[
{
"id": 13,
"code": "ING-NOT-2019",
"description": "Inglês Noturno 2019",
"start_date": "2019-12-30T03:00:00.000Z",
"end_date": "2019-12-31T03:00:00.000Z",
"period": "Noturno",
"language": "Inglês",
"status": false,
"user_id": 1,
"created_at": "2019-12-30 10:04:47",
"updated_at": "2020-01-05 16:08:00",
"language_substring": "US"
},
{
"id": 14,
"code": "ESP-MAN-2019",
"description": "Espanhol manhã 2019",
"start_date": "2019-12-30T03:00:00.000Z",
"end_date": "2019-12-31T03:00:00.000Z",
"period": "Manhã",
"language": "Espanhol",
"status": false,
"user_id": 1,
"created_at": "2019-12-30 11:06:44",
"updated_at": "2019-12-30 11:06:44",
"language_substring": null
}
]
I'm grouping the  bookUnitIdInfomacoes  by  book_id reducing the array into an object of  key => value  pairs as  book_id => array of books
Then, using [ Object.values ] to retrieve only the values of this  groupedObj  object.
Lastly, we map  idiomas  and add the corresponding book group into a new property called  quizz . For a given  idioma , we know its position in  idiomas  thanks to the second argument of  map :  i . We simply do  grouped[i]  to get the corresponding group of books.
The code:
const groupedObj = bookUnitIdInformacoes.reduce((grouped, info) => {
   grouped[info.book_id] = grouped[info.book_id] || [];
   grouped[info.book_id].push(info);
   return grouped;
 }, {});
 const grouped = Object.values(groupedObj);
 const result = idiomas.map((idioma, i) => ({
   ...idioma,
   quizz: grouped[i]
 }));
But when i do a return result i have this:
[
{
"__setters__": [
"$attributes",
"$persisted",
"primaryKeyValue",
"$originalAttributes",
"$relations",
"$sideLoaded",
"$parent",
"$frozen",
"$visible",
"$hidden"
],
"$attributes": {
"id": 2,
"code": "ING-NOT-2019",
"description": "Inglês Noturno 2019",
"start_date": "2019-12-30T03:00:00.000Z",
"end_date": "2019-12-31T03:00:00.000Z",
"period": "Noturno",
"language": "Inglês",
"status": false,
"user_id": 1,
"created_at": "2019-12-30T13:04:47.000Z",
"updated_at": "2020-01-05T19:08:00.000Z",
"language_substring": "US"
},
"$persisted": true,
"$originalAttributes": {
"id": 2,
"code": "ING-NOT-2019",
"description": "Inglês Noturno 2019",
"start_date": "2019-12-30T03:00:00.000Z",
"end_date": "2019-12-31T03:00:00.000Z",
"period": "Noturno",
"language": "Inglês",
"status": false,
"user_id": 1,
"created_at": "2019-12-30T13:04:47.000Z",
"updated_at": "2020-01-05T19:08:00.000Z",
"language_substring": "US"
},
"$relations": {},
"$sideLoaded": {},
"$parent": null,
"$frozen": false,
"quizz": [
{
"id": 1,
"book_id": 1,
"unit": 1,
"sequence": 1,
"description": "UNIT_01_GRAMMAR",
"qt_question": 5,
"status": false,
"user_id": 1,
"created_at": "2019-12-27 08:11:21",
"updated_at": "2019-12-30 14:54:12",
"miniature": null
},
{
"id": 2,
"book_id": 1,
"unit": 1,
"sequence": 2,
"description": "UNIT_01_VOCABULARY",
"qt_question": 5,
"status": false,
"user_id": 1,
"created_at": "2019-12-27 08:11:39",
"updated_at": "2019-12-27 08:11:39",
"miniature": null
},
{
"id": 3,
"book_id": 1,
"unit": 2,
"sequence": 1,
"description": "UNIT_02_GRAMMAR",
"qt_question": 5,
"status": false,
"user_id": 1,
"created_at": "2019-12-27 08:11:46",
"updated_at": "2019-12-27 08:11:46",
"miniature": null
}
]
},
{
"__setters__": [
"$attributes",
"$persisted",
"primaryKeyValue",
"$originalAttributes",
"$relations",
"$sideLoaded",
"$parent",
"$frozen",
"$visible",
"$hidden"
],
"$attributes": {
"id": 3,
"code": "ESP-MAN-2019",
"description": "Espanhol manhã 2019",
"start_date": "2019-12-30T03:00:00.000Z",
"end_date": "2019-12-31T03:00:00.000Z",
"period": "Manhã",
"language": "Espanhol",
"status": false,
"user_id": 1,
"created_at": "2019-12-30T14:06:44.000Z",
"updated_at": "2019-12-30T14:06:44.000Z",
"language_substring": null
},
"$persisted": true,
"$originalAttributes": {
"id": 3,
"code": "ESP-MAN-2019",
"description": "Espanhol manhã 2019",
"start_date": "2019-12-30T03:00:00.000Z",
"end_date": "2019-12-31T03:00:00.000Z",
"period": "Manhã",
"language": "Espanhol",
"status": false,
"user_id": 1,
"created_at": "2019-12-30T14:06:44.000Z",
"updated_at": "2019-12-30T14:06:44.000Z",
"language_substring": null
},
"$relations": {},
"$sideLoaded": {},
"$parent": null,
"$frozen": false,
"quizz": [
{
"id": 4,
"book_id": 2,
"unit": 1,
"sequence": 1,
"description": "UNIT_01_GRAMMAR",
"qt_question": 5,
"status": false,
"user_id": 1,
"created_at": "2019-12-30 11:07:09",
"updated_at": "2019-12-30 15:03:50",
"miniature": null
}
]
}
]
How i can deserialize this? JSON.stringify(result) returns the same json.
Try this:
const result = idiomas.map(({ $attributes }, i) => ({
...$attributes,
quizz: grouped[i]
}))

Azure media services encoding failed with error : 0x80131040

I have some Azure media encoding jobs failing with the below error.
This is an error from azure backend side after the job has been submitted successfully.
Task 'encode', Error : ErrorProcessingTask : Unexpected error when
setting up the Windows Azure Media Encoder task workflow:Could not
load file or assembly 'Microsoft.WindowsAzure.MediaServices.Platform,
Version=2.10.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or
one of its dependencies. The located assembly's manifest definition
does not match the assembly reference. (Exception from HRESULT:
0x80131040)
Any idea what is happening here?
I found out that for some reason using the old encoding job preset names like H264 Adaptive Bitrate MP4 Set 720p and the old processor name Windows Azure Media Encoder do not work anymore. Maybe it is temporary maybe not
I fixed the issue by using the processor name Media Encoder Standard and using a job config string like :
{
"Version": 1.0,
"Codecs": [
{
"KeyFrameInterval": "00:00:02",
"StretchMode": "AutoSize",
"H264Layers": [
{
"Profile": "Auto",
"Level": "auto",
"Bitrate": 3400,
"MaxBitrate": 3400,
"BufferWindow": "00:00:05",
"Width": 1280,
"Height": 720,
"BFrames": 3,
"ReferenceFrames": 3,
"AdaptiveBFrame": true,
"Type": "H264Layer",
"FrameRate": "0/1"
},
{
"Profile": "Auto",
"Level": "auto",
"Bitrate": 2250,
"MaxBitrate": 2250,
"BufferWindow": "00:00:05",
"Width": 960,
"Height": 540,
"BFrames": 3,
"ReferenceFrames": 3,
"AdaptiveBFrame": true,
"Type": "H264Layer",
"FrameRate": "0/1"
},
{
"Profile": "Auto",
"Level": "auto",
"Bitrate": 1500,
"MaxBitrate": 1500,
"BufferWindow": "00:00:05",
"Width": 960,
"Height": 540,
"BFrames": 3,
"ReferenceFrames": 3,
"AdaptiveBFrame": true,
"Type": "H264Layer",
"FrameRate": "0/1"
},
{
"Profile": "Auto",
"Level": "auto",
"Bitrate": 1000,
"MaxBitrate": 1000,
"BufferWindow": "00:00:05",
"Width": 640,
"Height": 360,
"BFrames": 3,
"ReferenceFrames": 3,
"AdaptiveBFrame": true,
"Type": "H264Layer",
"FrameRate": "0/1"
},
{
"Profile": "Auto",
"Level": "auto",
"Bitrate": 650,
"MaxBitrate": 650,
"BufferWindow": "00:00:05",
"Width": 640,
"Height": 360,
"BFrames": 3,
"ReferenceFrames": 3,
"AdaptiveBFrame": true,
"Type": "H264Layer",
"FrameRate": "0/1"
},
{
"Profile": "Auto",
"Level": "auto",
"Bitrate": 400,
"MaxBitrate": 400,
"BufferWindow": "00:00:05",
"Width": 320,
"Height": 180,
"BFrames": 3,
"ReferenceFrames": 3,
"AdaptiveBFrame": true,
"Type": "H264Layer",
"FrameRate": "0/1"
}
],
"Type": "H264Video"
},
{
"Profile": "AACLC",
"Channels": 2,
"SamplingRate": 48000,
"Bitrate": 128,
"Type": "AACAudio"
}
],
"Outputs": [
{
"FileName": "{Basename}_{Width}x{Height}_{VideoBitrate}.mp4",
"Format": {
"Type": "MP4Format"
}
}
]
}

Is it possible to locate a place in India based on Pincode(627357) in google maps

I am trying to implement a search option in my google map using pincode... Is it possible? Any suggestion....
Is this what you want? The Zip Code shown is in Madison, Wisconsin:
maps.google.com/maps?q=53711
I imagine you are using some other method, but without more details this is by best guess.
I know its late to answer the question, but it may help others who search for it. Go to geonames.org. They do have an api to get location information from postal codes. The response contains latitude and longitude information. You can use this information to put on the map.
Below is a sample request and response:
Request:
http://api.geonames.org/postalCodeLookupJSON?postalcode=627357&username=demo&country=IN
The following is the response:
{
"postalcodes": [{
"adminName2": "Tirunelveli",
"adminName3": "Tirunelveli",
"postalcode": "627357",
"adminCode1": "25",
"countryCode": "IN",
"lng": 77.38515755863037,
"placeName": "Karaiyiruppu",
"lat": 9.042148763528974,
"adminName1": "Tamil Nadu"
}, {
"adminName2": "Tirunelveli",
"adminName3": "Tirunelveli",
"postalcode": "627357",
"adminCode1": "25",
"countryCode": "IN",
"lng": 77.38515755863037,
"placeName": "Nanajankulam",
"lat": 9.042148763528974,
"adminName1": "Tamil Nadu"
}, {
"adminName2": "Tirunelveli",
"adminName3": "Tirunelveli",
"postalcode": "627357",
"adminCode1": "25",
"countryCode": "IN",
"lng": 77.38515755863037,
"placeName": "Naranammalpuram",
"lat": 9.042148763528974,
"adminName1": "Tamil Nadu"
}, {
"adminName2": "Tirunelveli",
"adminName3": "Tirunelveli",
"postalcode": "627357",
"adminCode1": "25",
"countryCode": "IN",
"lng": 77.38515755863037,
"placeName": "Pallaikottai",
"lat": 9.042148763528974,
"adminName1": "Tamil Nadu"
}, {
"adminName2": "Tirunelveli",
"adminName3": "Tirunelveli",
"postalcode": "627357",
"adminCode1": "25",
"countryCode": "IN",
"lng": 77.38515755863037,
"placeName": "Sankarnagar",
"lat": 9.042148763528974,
"adminName1": "Tamil Nadu"
}, {
"adminName2": "Tirunelveli",
"adminName3": "Tirunelveli",
"postalcode": "627357",
"adminCode1": "25",
"countryCode": "IN",
"lng": 77.38515755863037,
"placeName": "Tenkulam",
"lat": 9.042148763528974,
"adminName1": "Tamil Nadu"
}]
}

Resources