Project

General

Profile

Feature #3536

new shapefile and excel file uploaded

Added by Giulio Di Anastasio almost 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
23/01/2017
Due date:
% Done:

100%

Spent time:
Close

Description

Dear Philippe,
I uploaded the shapefile geological_formations.zip
and the excel file
geological formation.xlsx

The shapefile includes the styling file .qml as well

Waiting for your feedback

Giulio

History

#1 Updated by Philippe May almost 8 years ago

In the shapefile, the id field is not unique. This generates errors when importing, i might even create multi polygons, which isn't great.

So, you should keep the field "id" unique for each shape, and add another field (geological_formation?) for linking to the data table.

#2 Updated by Philippe May almost 8 years ago

One of the features in the shapefile (id=17) is actually a multipolygon. This is curious, because QGIS says about the shapefile:
Geometry type: Polygon.

The issue is: Postgis requires to define the type of geometries in the table, which is simple polygon in this case.
Until now, in gisaf we have only treated single types, not multi.

It would require few hours to code support for multi-geometries. In general, i feel it would be a basic feature, and this issue kinda shows it: a small mistake (assuming you tried to make only single polygons) will block the import. As a side note, i should make the error message to be more explicit, easier to read anyway.

In your crystal ball, do you see this issue might reappear regularly?
Of course, you can also split the multipolygons in QGIS and re-upload the files.

#3 Updated by Giulio Di Anastasio almost 8 years ago

  • Status changed from New to Closed

Dear Philippe,
I changed the multi polygon into single polygons, and now I uploaded into the basket, and then imported into the DB. IT WORKS!!

I prefer to have single polygons, it will help in future.

If you can style it, the mL file is in the zip of geological_formation_29012017
Also, in the popup, we can show the name of the formation, which is in the excel file

Thanks!!

Giulio

#4 Updated by Philippe May almost 8 years ago

  • Status changed from Closed to In Progress

Nice :)

I added information in the popup. Not deployed on the server yet, but it works on my laptop.

There's a tricky issue with the styling.
In short, gisaf uses the category (in QGis) as "css class" in the browser, i didn't think that the categories could be numbers.

But, there's a constraint about the name, as clearly explained in http://stackoverflow.com/questions/448981/which-characters-are-valid-in-css-class-names-selectors:

Basically, a name must begin with an underscore (_), a hyphen (-), or a letter(a–z), followed by any number of hyphens, underscores, letters, or numbers. There is a catch: if the first character is a hyphen, the second character must2 be a letter or underscore, and the name must be at least 2 characters long.

2 options:
- I can change the software (we'd need to reimport the already imported shapefiles)
- we can put in the specifications that categories MUST follow the naming convention above, as you want.

I feel, again, that making gisaf more robust (first option) is a good idea.

#5 Updated by Philippe May almost 8 years ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

I proceeded. Categories (in QGis) with only numbers are OK -> geologists an now enjoy nice colors too thumbsup

I also re-imported on the production server the shapefiles to match this change.

Also available in: Atom PDF