From frozza at gmail.com Thu Nov 1 08:32:56 2018 From: frozza at gmail.com (Angelo Frozza) Date: Thu, 1 Nov 2018 12:32:56 -0300 Subject: [GeoJSON] What is the correct way to add a bbox in a GeoJSON object? Message-ID: I'm generating some GeoJSON documents and I was unsure how to properly add a bbox to a geometry. Do I need to necessarily create a Feature object to add the bbox (example 1) or can I do this in the geometry itself (example 2)? The GeoSON specification (https://tools.ietf.org/html/rfc7946#appendix-A) presents examples only with the bbox in a GeoJSON object of type Feature, however, validators accept the two modes of inserting the bbox. *Example 1*: In this example, the bbox is an element of the GeoJSON object of type Feature. { "type": "Feature", "properties": {"id": 1, "Linha": null}, "bbox": [-48.573569106948469, -27.837770518544438, -48.417446881093412, -27.381161181879751], "geometry": { "type": "LineString", "coordinates": [ [-48.417446881093412, -27.381161181879751], [-48.573569106948469, -27.837770518544438] ] } } *Example 2*: In this other example, the bbox was included directly in the GeoJSON object with the geometry (LineString). { "type": "LineString", "bbox": [-48.573569106948469, -27.837770518544438, -48.417446881093412, -27.381161181879751], "coordinates": [ [-48.417446881093412, -27.381161181879751], [-48.573569106948469, -27.837770518544438] ] } -- ----- Prof. Angelo Augusto Frozza, M.Sc. angelo.frozza at ifc.edu.br Doutorando PPGCC/UFSC Professor EBTT IFC - Instituto Federal Catarinense - Campus Cambori? http://about.me/tilfrozza *Sugest?es de leitura:* *NoSQL DAiLY - https://paper.li/TilFrozza/1460718203 * *STARTUP NEWS - http://paper.li/TilFrozza/1392231760 * *A CAVERNA DO MESTRE - http://paper.li/TilFrozza/1392230815 * *RESUMO DA SEMANA - http://paper.li/TilFrozza/1392231274 * -------------- next part -------------- An HTML attachment was scrubbed... URL: From frozza at gmail.com Thu Nov 1 08:32:56 2018 From: frozza at gmail.com (Angelo Frozza) Date: Thu, 1 Nov 2018 12:32:56 -0300 Subject: [GeoJSON] What is the correct way to add a bbox in a GeoJSON object? Message-ID: I'm generating some GeoJSON documents and I was unsure how to properly add a bbox to a geometry. Do I need to necessarily create a Feature object to add the bbox (example 1) or can I do this in the geometry itself (example 2)? The GeoSON specification (https://tools.ietf.org/html/rfc7946#appendix-A) presents examples only with the bbox in a GeoJSON object of type Feature, however, validators accept the two modes of inserting the bbox. *Example 1*: In this example, the bbox is an element of the GeoJSON object of type Feature. { "type": "Feature", "properties": {"id": 1, "Linha": null}, "bbox": [-48.573569106948469, -27.837770518544438, -48.417446881093412, -27.381161181879751], "geometry": { "type": "LineString", "coordinates": [ [-48.417446881093412, -27.381161181879751], [-48.573569106948469, -27.837770518544438] ] } } *Example 2*: In this other example, the bbox was included directly in the GeoJSON object with the geometry (LineString). { "type": "LineString", "bbox": [-48.573569106948469, -27.837770518544438, -48.417446881093412, -27.381161181879751], "coordinates": [ [-48.417446881093412, -27.381161181879751], [-48.573569106948469, -27.837770518544438] ] } -- ----- Prof. Angelo Augusto Frozza, M.Sc. angelo.frozza at ifc.edu.br Doutorando PPGCC/UFSC Professor EBTT IFC - Instituto Federal Catarinense - Campus Cambori? http://about.me/tilfrozza *Sugest?es de leitura:* *NoSQL DAiLY - https://paper.li/TilFrozza/1460718203 * *STARTUP NEWS - http://paper.li/TilFrozza/1392231760 * *A CAVERNA DO MESTRE - http://paper.li/TilFrozza/1392230815 * *RESUMO DA SEMANA - http://paper.li/TilFrozza/1392231274 * -------------- next part -------------- An HTML attachment was scrubbed... URL: