You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Ahmed,
I would like to process geoJSON structures, like so:
const json = {
"features": [
{
"type" : "Feature",
"properties" : {
"str_schl" : "02505",
"baumgruppe" : "Tilia"
},
"geometry" : {
"type" : "Point",
"coordinates" : [ 7.612346614095637, 51.974634186495123 ]
}
},
{
//2nd flat record included for test purposes ..
"type" : "Feature",
"str_schl" : "02505",
"lat" : 51,
"lon" : 7
}
]
}
//
Q = Q.reset()
const features = Q.from( 'features' )
.where( 'properties.str_schl' , '=', '02505' ) //? no success
//.where( 'coordinates.0' , '=', 7 ) //? no success
//.where( 'type' , '=', 'Feature' ) //OK, flat found
//.where( 'str_schl' , '=', '02505' ) //OK, flat found
//.where( 'lat' , '>', 50 ) //OK, flat found
//.where( 'lon' , '<', 8 ) //OK, flat found
.fetch()
console.log('-------- features from where ---------')
features.forEach( feature=>console.log( feature ) )
May I ask:
(1) How can I access "deep" keys like "str_schl" within "properties" : .. ?
(2) or getting "coordinates" i.e. [lon, lat] within "geometry": .. ?
For any advice/hints
thanks in advance
Wolfgang
The text was updated successfully, but these errors were encountered:
Hi Ahmed,
I would like to process geoJSON structures, like so:
May I ask:
(1) How can I access "deep" keys like "str_schl" within "properties" : .. ?
(2) or getting "coordinates" i.e. [lon, lat] within "geometry": .. ?
For any advice/hints
thanks in advance
Wolfgang
The text was updated successfully, but these errors were encountered: