This repository has been archived by the owner on Jan 22, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
home
Hsu Ting edited this page Nov 26, 2015
·
8 revisions
convert2geojson is used to convert files into geojson
format, and can open a simple map to show all data.
-
-ncv
-> (does) not convert data to geojson -
-test
-> open simple map
- The map can be accessed at
http://localhost:9090/
. - The map server uses webpack dev server API.
- Every format is acceptable, but data must have a min unit.
- Identical field names will be collected in an array.
- Data examples:
- Point
- It can be a number or an array, such as
20
or[10, 20, 30]
. - If using an array, the number of
Longitude
values must be equal to the number ofLatitude
values.
- It can be a number or an array, such as
- LineString
- It can be an array, such as
[ [10, 20], [20, 30] ]
.
- It can be an array, such as
- Polygon
- It can be an array, such as
[ [[10, 20], [20, 30]], [[24, 53], [23, 54]] ]
.
- It can be an array, such as
- Example:
Input
[
{
"name": "title",
"data": {
"Lon": "120",
"Lat": "24",
"num": "test",
"test": {
"num": "0",
"try": "1",
"array": [
{"num": "24"}
]
}
}
},
{
"name": "title2",
"data": {
"Lon": "120.2",
"Lat": "24.1",
"num": "test",
"test": {
"num": "2",
"try": "5",
"array": [
{"num": "10"},
{"num": "2"}
]
}
}
}
]
Output
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
120,
24
]
},
"properties": {
"name": "title",
"num": [
"test",
"0",
"24"
],
"try": "1",
"lon": "120",
"lat": "24"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
120.2,
24.1
]
},
"properties": {
"name": "title2",
"num": [
"test",
"2",
"10",
"2"
],
"try": "5",
"lon": "120.2",
"lat": "24.1"
}
}
]
}
-
csv
convert toPoint
only.
Input
Date,Lat,Lon,Value
10/15,21,20,100
10/25,12,34,50
10/25,14,52,83
Output
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
20,
21
]
},
"properties": {
"Date": "10/15",
"Lat": "21",
"Lon": "20",
"Value": "100"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
34,
12
]
},
"properties": {
"Date": "10/25",
"Lat": "12",
"Lon": "34",
"Value": "50"
}
},
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
52,
14
]
},
"properties": {
"Date": "10/25",
"Lat": "14",
"Lon": "52",
"Value": "83"
}
}
]
}