On a bit more exploration.

Here is a script that can read these file and emit JSON:
https://raw.githubusercontent.com/dilawar/Scripts/7903397d8f5134ca08c03f2767eeb19db7a0f902/mvt2json.py

Example:

$ python3 mvt2json.py ~/Downloads/censuswardboundary_719_456.mvt

{'censuswardboundary': {'extent': 4096, 'version': 2, 'features':
[{'geometry': {'type': 'Polygon', 'coordinates': [[[131, 3552], [172,
3525], [187, 3518], [204, 3496], [220, 3497], [231, 3500], [275,
3503], [317, 3502], [318, 3498], [322, 3497], [326, 3489], [329,
3488], [323, 3479], [328, 3468], [327, 3459], [338, 3461], [345,
3459], [355, 3453], [391, 3421], [437, 3370], [447, 3354], [470,
3331], [485, 3318], [501, 3309], [539, 3297], [556, 3293], [572,
3288], [570, 3277], [561, 3254], [558, 3237], [555, 3233], [554,
3224], [547, 3204], [541, 3204], [545, 3202], [544, 3196], [535,
3177], [531, 3175], [526, 3175], [527, 3174], [528, 3170], [528,
3165], [522, 3152], [511, 3134], [507, 3130], [503, 3128], [494,
3115], [431, 3065], [410, 3042], [400, 3042], [405, 3037], [400,
3041], [399, 3040], [402, 3035], [381, 3007], [362, 2965], [351,
2981], [333, 2992], [308, 3003], [285, 3015], [277, 3018], [246,
3022], [239, 3030], [237, 3042], [131, 3039], [114, 3035], [110,
3030], [105, 3029], [105, 3024], [104, 3024], [102, 3018], [91, 3012],
[95, 2980], [90, 2980], [87, 2976], [81, 2976], [79, 2974], [80,
2966], [90, 2959], [72, 2941], [70, 2941], [71, 2947], [61, 2957],
[61, 2964], [62, 2969], [60, 2972], [51, 2977], [45, 2986], [38,
2988], [33, 2996], [31, 3002], [30, 3017], [31, 3024], [29, 3031],
[32, 3042], [39, 3052], [44, 3055], [47, 3065], [56, 3074], [63,
3077], [63, 3079], [60, 3082], [65, 3084], [67, 3094], [75, 3098],
[80, 3106], [68, 3166], [54, 3179], [49, 3199], [61, 3196], [70,
3199], [76, 3205], [85, 3223], [86, 3231], [82, 3241], [78, 3238],
[75, 3241], [68, 3241], [78, 3...



Will output the JSON to console which you can redirect to a file. Attached
is one of your files converted to JSON file.

This script depends on https://github.com/tilezen/mapbox-vector-tile. MVT
specification is here
https://github.com/mapbox/vector-tile-spec/tree/master/2.1 (once you know
it searching for tools is easy).

This is not the most convenient solution but if you ask for a better tool,
mention this on the gis.stackexchange.com site. It's good to do your own
homework :).

best,
    Dilawar
--
Dilawar Singh, Ph.D.
LinkedIn <https://www.linkedin.com/in/dilawar-singh-ph-d-44b81b194/> ORCID
<https://orcid.org/0000-0002-4645-3211> Github <https://github.com/dilawar>


On Wed, Dec 16, 2020 at 2:41 AM Dilawar Singh <[email protected]>
wrote:

> Reference: https://gdal.org/drivers/vector/mvt.html
>
> It doesn't look like GDAL is capable of converting MVT with 3d values to
> GeoJSON. Most of your GIS software uses gdal behind the scene for
> conversion.
>
> [dilawars@chutki Downloads]$ ogr2ogr -f GeoJSON a.geojson 
> censuswardboundary_719_456.mvt
> ERROR 1: Layer 'censuswardboundary_label' does not already exist in the 
> output dataset, and cannot be created by the output driver.
> ERROR 1: Terminating translation prematurely after failed
> translation of layer censuswardboundary_label (use -skipfailures to skip 
> errors)
>
> Try https://gis.stackexchange.com/ for better luck.
>
> best,
>    Dilawar
>
> On Wed, Dec 16, 2020 at 12:04 AM Arun Ganesh <[email protected]> wrote:
>
>> It’s hard to know what’s happening without looking at the actual mvt.
>> Where did you get it from?
>>
>> On Tue, Dec 15, 2020 at 6:25 AM Vijay Sapkal <[email protected]>
>> wrote:
>>
>>> Hello,
>>> When I am searching EPSG: 4326 and selecting it to run file. It is not
>>> showing any result.
>>> I am not able to see any point/line/polygon. Please help.
>>>
>>> Thanks,
>>> Vijay
>>>
>>> On Tue, Dec 15, 2020 at 4:25 PM Souvik Sankar Mitra <
>>> [email protected]> wrote:
>>>
>>>> I think EPSG: 4326 is a good option. Means WGS84
>>>>
>>>> On Tue, Dec 15, 2020 at 4:03 PM Vijay Sapkal <[email protected]>
>>>> wrote:
>>>>
>>>>> Hey, while running this file in QGIS, it is asking me to select CRS
>>>>> (coordinate reference system), which one I should select for this file?
>>>>>
>>>>> On Tue, Dec 15, 2020 at 3:49 PM Vijay Sapkal <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Thank you, l'll try and get back to you.
>>>>>>
>>>>>> On Tue, Dec 15, 2020 at 3:36 PM Souvik Sankar Mitra <
>>>>>> [email protected]> wrote:
>>>>>>
>>>>>>> Open it in QGIS. Then export it in other formats.
>>>>>>>
>>>>>>> On Tue, Dec 15, 2020 at 3:29 PM Vijay Sapkal <[email protected]>
>>>>>>> wrote:
>>>>>>>
>>>>>>>> Hello team,
>>>>>>>>
>>>>>>>> I need help to run .mvt file. Is it possible for anyone to do it
>>>>>>>> quickly for me?
>>>>>>>> Waiting for your reply,
>>>>>>>>
>>>>>>>> Thanks,
>>>>>>>> Vijay
>>>>>>>>
>>>>>>>> --
>>>>>>>> Datameet is a community of Data Science enthusiasts in India. Know
>>>>>>>> more about us by visiting http://datameet.org
>>>>>>>> ---
>>>>>>>> You received this message because you are subscribed to the Google
>>>>>>>> Groups "datameet" group.
>>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>>> send an email to [email protected].
>>>>>>>> To view this discussion on the web visit
>>>>>>>> https://groups.google.com/d/msgid/datameet/CA%2BzgrCRqt1oYTuof%2BnhMsVsSX%3DEVKHdctO-k%2BmGahH2fU86CeA%40mail.gmail.com
>>>>>>>> <https://groups.google.com/d/msgid/datameet/CA%2BzgrCRqt1oYTuof%2BnhMsVsSX%3DEVKHdctO-k%2BmGahH2fU86CeA%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>>> .
>>>>>>>>
>>>>>>> --
>>>>>>> Datameet is a community of Data Science enthusiasts in India. Know
>>>>>>> more about us by visiting http://datameet.org
>>>>>>> ---
>>>>>>> You received this message because you are subscribed to the Google
>>>>>>> Groups "datameet" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
>>>>>>> send an email to [email protected].
>>>>>>> To view this discussion on the web visit
>>>>>>> https://groups.google.com/d/msgid/datameet/CAM88csWbcdU5dbm8ttP%3D6%3Dx5yKMKzwCwjue_dR3f-F49_LiAfw%40mail.gmail.com
>>>>>>> <https://groups.google.com/d/msgid/datameet/CAM88csWbcdU5dbm8ttP%3D6%3Dx5yKMKzwCwjue_dR3f-F49_LiAfw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>>>> .
>>>>>>>
>>>>>> --
>>>>> Datameet is a community of Data Science enthusiasts in India. Know
>>>>> more about us by visiting http://datameet.org
>>>>> ---
>>>>> You received this message because you are subscribed to the Google
>>>>> Groups "datameet" group.
>>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>>> an email to [email protected].
>>>>> To view this discussion on the web visit
>>>>> https://groups.google.com/d/msgid/datameet/CA%2BzgrCS-RwhWws%2BJSGLas%3DhyDQUfZkcxeM40eji5VGk05_S-Nw%40mail.gmail.com
>>>>> <https://groups.google.com/d/msgid/datameet/CA%2BzgrCS-RwhWws%2BJSGLas%3DhyDQUfZkcxeM40eji5VGk05_S-Nw%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>>> .
>>>>>
>>>> --
>>>> Datameet is a community of Data Science enthusiasts in India. Know more
>>>> about us by visiting http://datameet.org
>>>> ---
>>>> You received this message because you are subscribed to the Google
>>>> Groups "datameet" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to [email protected].
>>>> To view this discussion on the web visit
>>>> https://groups.google.com/d/msgid/datameet/CAM88csXSZ5pjEXgVE0MMgANzXGQXXt1d0SvHi_%3D%2B7GtwXvJ%2BWg%40mail.gmail.com
>>>> <https://groups.google.com/d/msgid/datameet/CAM88csXSZ5pjEXgVE0MMgANzXGQXXt1d0SvHi_%3D%2B7GtwXvJ%2BWg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>>> .
>>>>
>>> --
>>> Datameet is a community of Data Science enthusiasts in India. Know more
>>> about us by visiting http://datameet.org
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "datameet" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to [email protected].
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/datameet/CA%2BzgrCRdM_ZPxg%3DERfCM5u%3DV9KFpHF2ymNyARe%2Bv%2BEaf8JO59g%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/datameet/CA%2BzgrCRdM_ZPxg%3DERfCM5u%3DV9KFpHF2ymNyARe%2Bv%2BEaf8JO59g%40mail.gmail.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>> --
>> Datameet is a community of Data Science enthusiasts in India. Know more
>> about us by visiting http://datameet.org
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "datameet" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/datameet/CA%2BGKQr1OWMDd5Ahk2%3DrPjtbTZzdJw5NVtmZ0hvop3wzqY9rRFg%40mail.gmail.com
>> <https://groups.google.com/d/msgid/datameet/CA%2BGKQr1OWMDd5Ahk2%3DrPjtbTZzdJw5NVtmZ0hvop3wzqY9rRFg%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
Datameet is a community of Data Science enthusiasts in India. Know more about 
us by visiting http://datameet.org
--- 
You received this message because you are subscribed to the Google Groups 
"datameet" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/datameet/CAM72-ZvaxA31oBmnDRtsL1TV14YT-%3Dd1ejn8fkwY%3D-ZDPEmKaw%40mail.gmail.com.

Reply via email to