<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hello,<br>
<br>
I am defining a geojson output for my service and I have a doubt. <br>
<br>
I have a list of objects witch have a geometry and they have a list
of childs with geometry. I have define two way to do this, but I do
not know what the best way to follow the standard GeoJson:<br>
<br>
<blockquote><small>{ </small><small>"crs" : { "properties" : {
"name" : "urn:ogc:def:crs:EPSG::23030" },<br>
"type" : "name"<br>
},<br>
"error" : false,</small><br>
<small> "features" : [ { "geometry" : { "geometries" : [ {
"coordinates" : [ 672675.71004015696,</small><br>
<small> 4613396.96000339</small><br>
<small> ],</small><br>
<small> "type" : "Point"</small>,<br>
<small> "properties" : {<br>
"type" : "parent"<br>
},</small><br>
<small> },</small><br>
<small> { "coordinates" : [ 672670.71009521,</small><br>
<small> 4613391.9600584405</small><br>
<small> ],</small><br>
<small> "properties" : {<br>
"child" :1,<br>
"type" : "child"<br>
},<br>
</small><small> "type" : "Point"</small><br>
<small> }</small><br>
<small> ],</small><br>
<small> "type" : "GeometryCollection"</small><br>
<small> },</small><br>
<small> "properties" : { </small><br>
<small> "propertie1" : "value",</small><br>
<small> "propertie2" : "value"</small><br>
<small> },</small><br>
<small> "type" : "Feature"</small><br>
<small> } ],</small><br>
<small> "numberOfRecords" : 1,</small><br>
<small> "type" : "FeatureCollection"</small><br>
<small>}</small><br>
</blockquote>
The other way to do:<br>
<blockquote><small>{ </small><small>"crs" : { "properties" : {
"name" : "urn:ogc:def:crs:EPSG::23030" },</small><br>
<small>
"type" : "name"</small><br>
<small>
},</small><br>
<small>
"error" : false,</small><br>
<small> "features" : [ { "geometry" : { "coordinates" : [
672675.71004015696, </small><small>4613396.96000339</small><small>],</small><br>
<small> "type" :
"Point"</small>,<small></small><br>
<small> },</small><small><br>
"properties" : { </small><br>
<small> "propertie1" : "value",</small><br>
<small> "propertie2" : "value"</small>,<br>
<small>"childs"</small> : [<small>{
"geometry" : { "coordinates" : [ 672675.71004015696, </small><small>4613396.96000339</small><small>],</small><br>
<small>
"type" : "Point"</small>,<br>
<small>
},</small><small><br>
"properties"
: { </small><br>
<small> "child"
: "1"</small><br>
<small> },</small><br>
<small> "type" :
"Feature"</small><br>
<small> }</small>]<br>
<small> },</small><br>
<small> "type" : "Feature"</small><br>
<small> } ],</small><br>
<small> "numberOfRecords" : 1,</small><br>
<small> "type" : "FeatureCollection"</small><br>
<small>}</small><br>
</blockquote>
You guys can advise me how?<br>
<br>
PD: Is there any online json validator?<br>
<br>
<div class="moz-signature">-- <br>
<font style="color: black; font-family: Arial,Helvetica;">
-----------------------------------------------------------<br>
<font style="font-size: 12pt; font-weight: bold; color: rgb(0,
0, 0);">Pedro Rodrigo Cardiel</font> <br>
<font style="font-size: 10pt; font-weight: bold; color: rgb(90,
91, 147);">Programador Senior</font> <br>
<img src="cid:part1.00000903.08010402@gmail.com" alt="GeoSLab
Logo" title="GeoSLab Logo" width="80px"> <br>
<font style="font-size: 9pt; font-weight: normal; color: rgb(0,
0, 0);"> C/ Carlos Marx, 6 CP 50015 Zaragoza (Spain)
</font> <br>
<font style="font-size: 9pt; font-weight: normal; color: rgb(0,
0, 0);"> Tlf: +34 976 762134 +34 976 065152 </font> <br>
<font style="font-size: 9pt; font-weight: normal; color: rgb(0,
0, 0);"> Fax: +34 976 106201 </font> <br>
<font style="font-size: 9pt; font-weight: normal; color:
rgb(0, 0, 254);"> <a style="color: rgb(0, 0, 254);
text-decoration: none;" href="mailto:prodrig@GeoSLab.com">prodrig@GeoSLab.com</a></font>
<br>
<font style="font-size: 9pt; font-weight: normal; color:
rgb(0, 0, 254);"> <a style="color: rgb(0, 0, 254);
text-decoration: none;" href="http://www.GeoSLab.com">http://www.GeoSLab.com</a></font>
<br>
<font style="font-size: 9pt; font-weight: normal; color:
rgb(0, 0, 254);"> <a style="color: rgb(0, 0, 254);
text-decoration: none;" href="http://twitter.com/GeoSLab">Follow
us on Twitter</a> </font> <br>
<hr> <font style="font-size: 7pt; font-weight: bold; color:
rgb(4, 180, 4);"> <i> Antes de imprimir este correo piensa
si realmente es necesario hacerlo / Before printing this
email, assess if it is really needed </i> </font><br>
<font style="font-size: 8pt; font-weight: normal; color: grey;">
<i> ---- ADVERTENCIA ---- <br>
La información contenida en este correo electrónico, y en su
caso, cualquier fichero anexo al mismo, son de carácter
privado y confidencial siendo para uso exclusivo de su
destinatario. Si usted no es el destinatario correcto, el
empleado o agente responsable de entregar el mensaje al
destinatario, o ha recibido esta comunicación por error, le
informamos que está totalmente prohibida cualquier
divulgación, distribución o reproducción de esta
comunicación según la legislación vigente y le rogamos que
nos lo notifique inmediatamente, procediendo a su
destrucción sin continuar su lectura. </i> </font> <br>
<font style="font-size: 8pt; font-weight: normal; color: grey;">
<i> ---- WARNING ---- <br>
Information contained in this email, and any attached files,
are private and confidential for the addressee. If you are
not the intended recipient, employee or agent responsible
for delivering this message to the addressee, or have
received this communication by mistake, please be aware that
any dissemination, distribution or duplication under current
laws is forbidden and we request you to notify us
immediately and destroy the message without continue
reading. </i> </font>
<hr> </font></div>
</body>
</html>