Re: [Geojson] Question regarding RFC 7946

"V. Kelly Bellis" <kellybellis@gwi.net> Mon, 18 March 2019 12:04 UTC

Return-Path: <kellybellis@gwi.net>
X-Original-To: geojson@ietfa.amsl.com
Delivered-To: geojson@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 5DE2512787F for <geojson@ietfa.amsl.com>; Mon, 18 Mar 2019 05:04:19 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.9
X-Spam-Level:
X-Spam-Status: No, score=-1.9 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id VG3obLzzhXJU for <geojson@ietfa.amsl.com>; Mon, 18 Mar 2019 05:04:16 -0700 (PDT)
Received: from smtprelay.b.hostedemail.com (smtprelay0141.b.hostedemail.com [64.98.42.141]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id BDB9112782C for <geojson@ietf.org>; Mon, 18 Mar 2019 05:04:16 -0700 (PDT)
Received: from filter.hostedemail.com (10.5.19.248.rfc1918.com [10.5.19.248]) by smtprelay05.b.hostedemail.com (Postfix) with ESMTP id 8A4BB32AEFD; Mon, 18 Mar 2019 12:04:15 +0000 (UTC)
X-Session-Marker: 6B656C6C7962656C6C6973406777692E6E6574
X-Spam-Summary: 2, 0, 0, , d41d8cd98f00b204, kellybellis@gwi.net, :::::, RULES_HIT:41:72:152:355:379:599:800:960:962:966:967:973:983:988:989:1189:1208:1212:1221:1260:1261:1313:1314:1345:1431:1436:1437:1516:1517:1518:1535:1543:1575:1588:1589:1592:1594:1685:1711:1730:1777:1792:2068:2069:2196:2199:2525:2553:2559:2568:2570:2627:2682:2685:2693:2703:2859:2902:2933:2937:2939:2942:2945:2947:2951:2954:3022:3148:3354:3622:3743:3865:3866:3867:3868:3870:3871:3872:3873:3874:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4118:4250:4321:4385:4605:5007:6117:6119:6120:6238:7208:7652:7901:7903:7974:8531:8957:9010:9025:9038:9040:9113:9121:9908:10004:10346:10400:11658:12740:13139:13161:13229:13237, 0, RBL:error, CacheIP:none, Bayesian:0.5, 0.5, 0.5, Netcheck:none, DomainCache:0, MSF:not bulk, SPF:fu, MSBL:0, DNSBL:neutral, Custom_rules:0:0:0, LFtime:76, LUA_SUMMARY:none
X-HE-Tag: brush55_5f3df8221821f
X-Filterd-Recvd-Size: 7396
Received: from [192.168.1.184] (bb-216-195-185-252.gwi.net [216.195.185.252]) (Authenticated sender: kellybellis@gwi.net) by omf09.b.hostedemail.com (Postfix) with ESMTPA; Mon, 18 Mar 2019 12:04:14 +0000 (UTC)
To: Erik Wilde <erik.wilde@dret.net>, Martin Daly <Martin.Daly@cadcorp.com>, "geojson@ietf.org" <geojson@ietf.org>
References: <86310cf6-e2d8-6c59-c845-b9862ba414a1@gwi.net> <CAOoFiBbxxH0h3xA=i_+G94Feb-Mh6yEfTEw71o-HH=tCkiU=Xg@mail.gmail.com> <589847ca-db3d-853e-1142-cbe0b3e61da5@gwi.net> <b95480321c1e498189ec72533a0b4c9f@SRV016VEX.cadcorp.net> <601730f4-f3ba-6d65-819b-3da80f72d1e8@dret.net>
From: "V. Kelly Bellis" <kellybellis@gwi.net>
Message-ID: <c13af1bb-52da-3767-677f-ecef3a71616e@gwi.net>
Date: Mon, 18 Mar 2019 08:04:11 -0400
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.5.3
MIME-Version: 1.0
In-Reply-To: <601730f4-f3ba-6d65-819b-3da80f72d1e8@dret.net>
Content-Type: multipart/alternative; boundary="------------C2C1DD1817EEE1CE11BC4965"
Content-Language: en-US
Archived-At: <https://mailarchive.ietf.org/arch/msg/geojson/4ClqNQtsXlnei3YbXC02Ix3MY88>
X-Mailman-Approved-At: Mon, 18 Mar 2019 15:50:29 -0700
Subject: Re: [Geojson] Question regarding RFC 7946
X-BeenThere: geojson@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: IETF GeoJSON WG <geojson.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/geojson>, <mailto:geojson-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/geojson/>
List-Post: <mailto:geojson@ietf.org>
List-Help: <mailto:geojson-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/geojson>, <mailto:geojson-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 18 Mar 2019 12:04:20 -0000

Hi Erik,

That's priceless! Thank you so much for the link 
<https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454>; 
I will treasure it always :)

Sorry my post was too long; I thought I was writing to GeoJASON support; 
not a mailing list.

Mr. Ince's Bruegelesque picture of regex wrestling with HTML aside, as a 
non-programmer and somebody who has never looked at a JSON file before, 
much less a JSON parser, I had no idea what I was walking into when 
thinking that it might be nice to see the OWM city ID list spatially 
displayed in Global Mapper.

I've written to Pavel Zuykov asking if the OWM city ID list could be 
exported as a .kml file from their 'geocoder database' (Pavel's words), 
the same which produced the original .json file

Many thanks to you and to Martin for your kind replies.

Kelly


On 3/18/2019 5:28 AM, Erik Wilde wrote:
> hello.
>
> On 2019-03-18 10:06, Martin Daly wrote:
>> You have no “FeatureCollection” object, and therefore no “features” 
>> array. Your “properties” object does not have commas between 
>> consecutive key/value pairs. That’s two problems to be going on with.
>>
>> You can use jsonlint.com and geojsonlint.com to check your output, 
>> which may give clearer errors than you have been getting.
>
> tl;dr: always pick the right tool for the job.
>
> martin is kind of right, but i think he's not going far enough. these 
> JSON problems tell you that it's not such a great idea to edit JSON 
> via regexes. to understand why, here's is the greatest answer ever 
> about why regex as a tool is limited in its applicability to complex 
> data:
>
> https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags/1732454 
>
>
> i'd highly recommend to parse the JSON using a JSON parser of your 
> choice (you'll find one in any programming language), do your 
> transformation magic on the parse tree, and then serialize the result.
>
> you will find this to be much more robust, extensible, and 
> predictable, even though it may seem like a bit of overkill in the 
> beginning.
>
> cheers,
>
> dret.
>
-- 
V. Kelly Bellis, PLS
17 Union Street
Ellsworth, ME 04605

Precisely */Determining True North 
<https://www.youtube.com/watch?v=zMwDkzl43n8>/* without a surveyor!