Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#8805 closed defect (fixed)

Pluging: opendata. "No data found" in simple CSV file

Reported by: brycenesbitt Owned by: Don-vip
Priority: minor Milestone:
Component: Plugin opendata Version:
Keywords: Cc:

Description

I tried to import various versions of this simple CSV file, but always got "No data found" from the plugin:

Address,lon,lat,geo_accuracy
"1422 PERALTA AVE BERKELEY CA 94702",-122.2877712,37.8809038,residential
"1578 HOPKINS ST KENSINGTON CA 94707",-122.2816511,37.8816759,coffee
"1302 VIRGINIA ST BERKELEY CA 94702",-122.288276419623,37.874054643623,house

It asks for the projection, and after selecting WGS84, I get the error.

Attachments (1)

XXX.csv (3.0 KB) - added by brycenesbitt 6 years ago.

Download all attachments as: .zip

Change History (4)

Changed 6 years ago by brycenesbitt

Attachment: XXX.csv added

comment:1 Changed 6 years ago by Don-vip

Resolution: fixed
Status: newclosed

Fixed in [o29666]. Thanks for the bug report :) While you're here, can you please answer my questions in #8788 ? Thanks.

comment:2 Changed 6 years ago by brycenesbitt

While you're in there, it would be nice if you added a hint on the load screen:

latitude and longitude are expected in columns named "lat" and "lon"

Or whatever it is. It is kind of murky now.

comment:3 Changed 6 years ago by Don-vip

The problem was linked to the way I parsed files with commas as separator instead of semicolons.
I cannot add such a message because the plugin is able to recognize a large number of potential combinations for the wording of "latitude" and "longitude":

    /**
     * Coordinates fields
     */
    public static final String X_STRING = "X|LON|LONGI|.*LONGITUDE.*|EASTING";
    public static final String Y_STRING = "Y|LAT|LATI|.*LATITUDE.*|NORTHING";
    
    // The list of all ProjectionPatterns (filled at each constructor call)
    public static final Collection<ProjectionPatterns> PROJECTIONS = new ArrayList<ProjectionPatterns>();
    
    public static final ProjectionPatterns PRJ_WGS84 = new ProjectionPatterns("GPS|WGS84|°décimaux", Projections.getProjectionByCode("EPSG:4326"));
    public static final ProjectionPatterns PRJ_LAMBERT_93 = new ProjectionPatterns("LAMB93|L93", Projections.getProjectionByCode("EPSG:2154"));
    public static final ProjectionPatterns PRJ_LAMBERT_CC_9_ZONES = new LambertCC9ZonesProjectionPatterns("LAMBZ|CC(42|43|44|45|46|47|48|49|50)");

    public static final ProjectionPatterns PRJ_LAMBERT_1972 = new ProjectionPatterns("LAMB72|LAMB1972", Projections.getProjectionByCode("EPSG:31370"));
    public static final ProjectionPatterns PRJ_LAMBERT_2008 = new ProjectionPatterns("LAMB08|LAMB2008", Projections.getProjectionByCode("EPSG:3812"));

    // Must always be declared last
    public static final ProjectionPatterns PRJ_UNKNOWN = new ProjectionPatterns("");

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Don-vip.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.