[uMap] UMAP and CSV delimiter

Fabrizio Carrai fabrizio.carrai at gmail.com
Tue Aug 1 11:09:18 UTC 2017


Thanks for the suggestion, I'll consider that for the future.
Now I already shared the GSheet URL with others and I would like to solve
the problem and continue to use this.

I started having a look at the sources in the hope to understand where the
problem is, and this is what I found : using the Chrome console I traced
the problem to the following function

    rawToGeoJSON: function(c, type, callback) {
        var self = this;
        var toDom = function(x) {
            return (new DOMParser()).parseFromString(x, 'text/xml');
        };
        if (type === 'csv') {
            *csv2geojson.csv2geojson*(c, {
                delimiter: '*auto*',
                includeLatLon: false
            }, function(err, result) {
                if (err) {
                    var message;
                    if (err.type === 'Error') {
                        message = err.message;
                    } else {
                        message = L._('{count} errors during import:
{message}', {
                            count: err.length,
                            message: err[0].message
                        });
                    }
                    self.map.ui.alert({
                        content: message,
                        level: 'error',
                        duration: 10000
                    });
                    console.log(err);

I hope the csv2geojson says something to somebody...

Ciao
Fabrizio

2017-07-31 19:56 GMT+02:00 Cascafico Giovanni <cascafico at gmail.com>:

> As a shared spreadsheet, consider to use ethercalc.org spreadsheet. It
> works.
>
> Il 31/lug/2017 14:42, "Fabrizio Carrai" <fabrizio.carrai at gmail.com> ha
> scritto:
>
>> Ciao Andrea,
>> yes, I do use commas to separate fields. Indeed it is Google that returns
>> the CSV data from the spreadsheet:
>>
>> https://spreadsheets.google.com/tq?tqx=out:csv&tq=&key=1QWF8
>> 7P6FsllTp2_NMG_eRmsJo6aUCB5Sxccf2zlYQUE
>>
>> I don't find the way to specify the UTF-8 as output, would it be possible
>> to specify it in UMAP ?
>>
>> It is a strange error message, indeed the separator is properly
>> selected....
>>
>>
>> Thanks!
>>
>> Fabrizio
>>
>> 2017-07-31 7:39 GMT+02:00 aborruso <aborruso at gmail.com>:
>>
>>> Ciao Fabrizio,
>>> if you use UTF-8 as encoding and "," as separator you do not have
>>> problem.
>>>
>>> Il lun 31 lug 2017, 07:32 Fabrizio Carrai [via Umap -- Discussions about
>>> uMap project] <[hidden email]
>>> <http:///user/SendEmail.jtp?type=node&node=59&i=0>> ha scritto:
>>>
>>>> Hello to the list!
>>>> I configured this map https://umap.openstreetmap
>>>> .fr/it/map/ariss-school-contacts-missione-vita_157353#7/44.610/12.316
>>>> accessing the data from a remote CSV file on Google Drive and every time I
>>>> refresh the page I got the message
>>>>
>>>> "Could not autodetect delimiter"
>>>>
>>>> (indeed a few repetitions on this). Of course, I had a look at the data
>>>> by they looks good. It seems that the app try to automatically detect the
>>>> character as field separator, but it fails.
>>>>
>>>> Any help ?
>>>>
>>>> Thanks
>>>>
>>>> FabC
>>>> --
>>>> *FabC*
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Umap mailing list
>>>> [hidden email] <http:///user/SendEmail.jtp?type=node&node=58&i=0>
>>>> https://lists.openstreetmap.org/listinfo/umap
>>>>
>>>>
>>>> ------------------------------
>>>> If you reply to this email, your message will be added to the
>>>> discussion below:
>>>> http://umap-discussions-about-umap-project.2359850.n4.nabble
>>>> .com/uMap-UMAP-and-CSV-delimiter-tp58.html
>>>> To unsubscribe from Umap -- Discussions about uMap project, click here.
>>>> NAML
>>>> <http://umap-discussions-about-umap-project.2359850.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>>>
>>> --
>>>
>>> ______
>>> Scusami per la brevità, ti sto scrivendo dal cellulare.
>>>
>>> website: https://medium.com/tantotanto
>>> 38° 7' 48" N, 13° 21' 9" E EPSG:4326
>>>
>>> ------------------------------
>>> View this message in context: Re: [uMap] UMAP and CSV delimiter
>>> <http://umap-discussions-about-umap-project.2359850.n4.nabble.com/Re-uMap-UMAP-and-CSV-delimiter-tp59.html>
>>> Sent from the Umap -- Discussions about uMap project mailing list
>>> archive
>>> <http://umap-discussions-about-umap-project.2359850.n4.nabble.com/> at
>>> Nabble.com.
>>>
>>> _______________________________________________
>>> Umap mailing list
>>> Umap at openstreetmap.org
>>> https://lists.openstreetmap.org/listinfo/umap
>>>
>>>
>>
>>
>> --
>> *Fabrizio*
>>
>> _______________________________________________
>> Umap mailing list
>> Umap at openstreetmap.org
>> https://lists.openstreetmap.org/listinfo/umap
>>
>>
> _______________________________________________
> Umap mailing list
> Umap at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/umap
>
>


-- 
*Fabrizio*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/umap/attachments/20170801/20f7b874/attachment.htm>


More information about the Umap mailing list