Unable to upload GeoJSON file to iTunes Connect - ios

I'm getting the following error:
"The JSON file you uploaded was invalid. Errors : Each set of coordinates provided must be valid"
The Contents of the file are:
{ "type" : "MultiPolygon",
"coordinates": [
[[[19.5,-99.1], [19.5,-99.2], [19.3,-99.2], [19.2,-99.1], [19.2,-98.9], [19.3,-98.9], [19.5,-99.0]]]
]
}
I really can't find whats wrong, it works perfectly on the Simulator.
Any ideas ?

The order of Coordinate in GEOJSON is [longitude, latitude] :)
You can check more detail on: http://geojson.org/geojson-spec.html#appendix-a-geometry-examples
or validate your geoJSON on: http://geojsonlint.com
Hope it is helpful.

I copied swaped the order of the coordinates, as in the Apple Docs. And made the start and ending coordinates equal.

Related

How to save data from a radar device?

I have a problem to save my data from a radar device to a mat.file. Why do I wanna use a mat.file? Cause i want to use a SAR-algorithm afterwards in matlab. The radar what i am using is the 2 PI Labs SENSE X1155S-E radar. Additionally i am pretty new to python, that means my knowledge comes from forums and the documentation of python. I spent days testing things like "scipy.io.savemat", "pickle.dump", "file.write/.read" or "self.write", but I still can not save my data as i need it.
Here is an extract of my code:
# Dump a configuration object with all configured settings
config = device.sense.dump()
logger.info(f'Configuration: {config}')
logger.info('+ Running sweep(s)')
acq = device.initiate.immediate_and_receive()
# Read all data in one go
logger.info(' Read data')
data = acq.read()
# print(type(data)) # datatype check
logger.info(' Save data')
# create dict for storage
exportDict = {'data': data}
io.savemat("test.mat", exportDict)
With the commandline "data = acq.read()" i get the data from my radar. Now i want to use io.savemat() to save my data in a mat.file, but for some reason I always get an error:
"TypeError: Could not convert None (type <class 'NoneType'>) to array"
I could not fix it until today. Maybe someone can help me to understand, what i am doing wrong. If you need some more information, I can poste more for sure.
Here are 2 pictures of my data and the error. Hope it helps. Thanks.
screenshot of my variable "data" ;
screenshot of my error
Finally i managed to solve my problem.
As u can see in my first picture "variable data" there is a subpoint called "array", so i edit my code as follow:
import numpy as np
import scipy.io as
logger.info(' Save data')
# create dict for storage
exportDict = {'data': data.array}
io.savemat("test.mat", exportDict)
Now i can save the right data as i need it.

How to Reproject GeoJSON without crs property to WGS84 (to use React Leaflet)

(Please help I've been struggling with the same problem for more than three days...🤖)
I got GeoJSON file from National Statistical Office, which means it's official data- and the coordinates in this file look like this- :
[959394.1770449197,1948599.8772112513],
... ,
[1140386.5164449196,1684523.5489112514],
It's a GeoJSON object without a member named "crs", and as you can see, it's not using the WGS84 datum. Seems like it's coordinates to draw polygons, which are the shape of each district. I assume that there is no problem with data structure.
I tried to create map using this file with React Leaflet, but failed continuously. To find out if it's the problem of GeoJSON that I'm using, I used other GeoJSON files and it worked fine(meaning that interactive map was created on web) - By comparing the GeoJSON files, I found out that coordinates should be in WGS84 if I want to work with leaflet. So I tried to transform GeoJSON to WGS84 using reproject. In my react app project, I installed reproject, epsg and put the code below:
import * as mapData from '../data/sigunguWithPopGeo.json'
import { toWgs84 } from 'reproject'
import 'epsg'
let epsg = require('epsg');
toWgs84(mapData, undefined, epsg);
And the error was returned:
Error: Unable to detect CRS, GeoJSON has no "crs" property.
Thanks for reading this long intro - Finally here is my question.
Is there any way to reproject GeoJSON without "crs" property to WGS84? I also tried making the coordinates WGS84 with mapshaper.org. Again, I got the error caused by undefined coordinate system of GeoJSON file:
Unable to project -- source coordinate system is unknown
Should I consider adding crs property to GeoJSON? It's my very first time to create the interactive map using GeoJSON with React-leaflet, so any kind of advice from people who experienced similar projects would really help me!
Luckily, solved the problem by myself..!
Instead of keep looking for the methods to convert GeoJSON with undefined coordinate system to WGS84, I visited National Statistical Office's website to figure out the code of coordinate system that was used in src data - which was EPSG 5179. Then I converted GeoJSON file from EPSG 5179 to EPSG 4326(WGS84) on MyGeoData Converter. Before downloading the converted data, I checked on the map to see if the coordinates of data was successfully converted to proper lat, lng values. Hope this solution helps who are struggling with similar problems..👩‍🔧

Map: Direction in Mapkit to every Countries [duplicate]

My GeoJSON file is supposed to cover the entire world. Here is the GeoJSON file:
{ "type": "MultiPolygon",
"coordinates": [
[[[-169.4,58.8], [-168.0,83.4], [188.4,83.3], [194.0,-72.8], [-166.6,-73.6], [-169.4,58.8]]]
]
}
The name of the file is example.GeoJSON.
I keep getting the following error when uploading the file:
Your routing app coverage file is invalid. For more information see the Developer Guide.
What is wrong with the above file?
My app has a mapkit that shows the annotation of a particular place depending on the place that is chosen. When tapping the map in the app, Apple Maps opens up and shows the directions to that place from the current position. Do I also actually need to upload the .GeoJSON file?
Based on the following:
1) The Latitude goes from -90 into +90 (i.e. this is where you stand on the middle of the globe going either up or down) (AKA vertically).
2) The Longitude goes from 0 to 360 (i.e. standing where you are, and going around the globe in a circle horizontally.
3) The Polygon usually has 4 points, however, in this case it would be 5 whereas the first and last points are the same to denote a closed-polygon.
4) Adding the apple requirements of ( "type": "MultiPolygon" ) plus coordinates,
5) You would end up with the following contents of a file:
{ "type": "MultiPolygon",
"coordinates": [
[[
[-360.0000,-90.0000]
,[-360.0000, 90.0000]
,[-000.0000, 90.0000]
,[-000.0000,-90.0000]
,[-360.0000,-90.0000]
]]
]
}
Therefore, start your text editor, and then copy and paste the above, save the file into World.geojson and then upload.
Mine worked fine.
Enjoy!
Heider

Trying to send geoJSON file to iTunesConnect

I'm trying to upload the "Routing App Coverage File" to iTunesConnect. I get the message "Your file couldnt be saved, try again or contact us".
The file contents are below.. I've checked the contents on geojsonlint and they seem correct.
{ "type": "MultiPolygon",
"coordinates": [
[[ [-75.767212,39.702961],
[-76.25061,36.85545],
[-78.491821,38.030786],
[-78.200684,39.187562],
[-77.774963,39.626846],
[-75.767212,39.702961]
] ]]
}
Does the filename have to be special? Is there another problem?
This may help others. What solved this for me, was simply, that I had a couple of extra spaces, one at the beginning, and another at the end.

Passbook Pass does not load Localization

I made a Passbook pass for the hostel I work at. However, I didn't get the Pass to load the localization file. In the pass.json file I have this code:
"primaryFields" : [
{
"key" : "offer",
"label" : "offer_night",
"value" : "offer_free"
}
]
then I the en.lproj/pass.strings I have the following:
"offer_night" = "1 night";
"offer_free" = "FREE";
Now, when I load the pass on my phone, I only get the offer_night and offer_free and not 1 night and FREE.
Do I need to configure something that I haven't thought of so far?
EDIT: I am using the Apple signpass script. When I unzip the pass, the lproj folders are there. In the manifest the files are listed but the path is wrong (see my comment below).

Resources