Problems importing shapefile

50 views
Skip to first unread message

Luiz Menini

unread,
Mar 23, 2019, 6:31:53 PM3/23/19
to Biodiverse Users
Firstly, I would like to congratulate you on the extremely versatile and useful program.

I would like to ask a question. I can not import shapefiles, not even the sample files that are available in the 'data' folder.

Some messages, such as these ('Malformed UTF-8 character (fatal) at C: /berrybrew/5.26.2_64_PDL/perl/lib/Carp.pm line 324, <$ fh> line 2' or 'Malformed UTF-8 character (fatal) at Biodiverse/Common.pm line 1885') appear and the file does not load.

Any idea what might be happening?

Thank you for your attention.

Luiz.

Shawn Laffan

unread,
Mar 23, 2019, 7:21:55 PM3/23/19
to biodiver...@googlegroups.com
Hello Luiz,

This sounds like it could be a bug with the program, or one of the libraries it uses. 

Which version are you using?  And which operating system? 

And would you be able to send me a copy of the shapefile you are using?  A subset would be sufficient. 


Regards,
Shawn.
--
You received this message because you are subscribed to the Google Groups "Biodiverse Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biodiverse-use...@googlegroups.com.
To post to this group, send email to biodiver...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/biodiverse-users/080e57a1-26ca-4e98-98a7-b275306d9d86%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

-- 
Assoc Prof Shawn Laffan
  School of Biological, Earth and Environmental Sciences
  UNSW, Sydney 2052, Australia
  Tel +61 2 9385 8093
  http://www.bees.unsw.edu.au/staff/shawn-laffan
  https://shawnlaffan.github.io/biodiverse (free diversity analysis software)
  
  Editor, International Journal of Geographical Information Science
  http://www.tandf.co.uk/journals/ijgis

  UNSW CRICOS Provider Code 00098G

Dan Rosauer

unread,
Mar 23, 2019, 8:16:09 PM3/23/19
to biodiver...@googlegroups.com
Just speculating, but perhaps an issue with accented characters in the file path??

Some of my Portuguese students had that problem.


Shawn Laffan

unread,
Mar 23, 2019, 8:20:43 PM3/23/19
to biodiver...@googlegroups.com
Thanks Dan.

If so then it as another manifestation of issue #272:  https://github.com/shawnlaffan/biodiverse/issues/272

Luiz - if you have an accented character in the file name then could you try renaming or copying the shapefile so it has no such characters?  If that version works then it will be due to issue #272.

We have a warning in place for delimited text files when this happens, but it has not yet been applied for other formats.

Regards,
Shawn.

For more options, visit https://groups.google.com/d/optout.

Luiz Menini

unread,
Mar 23, 2019, 8:24:25 PM3/23/19
to biodiver...@googlegroups.com
Thank you for the fast answers.

I am using the version 2.1 of the software Biodiverse. My operating system is Windows 10.

The first error is a message when I used the shapefiles provided with the Biodiverse, coastline_lamberts.shp and Example_site_data.shp. The second message is from the attached shapefile.

Indeed I received a message regarding the Portuguese accented words. But I changed the name of the attached file (mant) and the second message appears.

Thanks again.

Livre de vírus. www.avast.com.


For more options, visit https://groups.google.com/d/optout.


--
Dr. Luiz Menini Neto
--
Departamento de Botânica - Universidade Federal de Juiz de Fora
Programa de Pós-graduação em Ecologia da Universidade Federal de Juiz de Fora
Juiz de Fora - MG - Brasil

Livre de vírus. www.avast.com.
mant.dbf
mant.cpg
mant.qpj
mant.prj
mant.shp
mant.shx

Shawn Laffan

unread,
Mar 23, 2019, 8:40:26 PM3/23/19
to biodiver...@googlegroups.com
I just tested with the current development version, and I could reproduce the error when I left the format option as text. 

The system is not clever enough to detect file types from names or contents, so if you tell it that a file is delimited text then it will try to open it as text. 

Could you please retry, ensuring the format is set to shapefile?  See the screenshot below.  If you do this then you should not need to list files of all types to see the shp file.

If that does not work then I will do more digging, as the internal shapefile handling has changed substantially since version 2.1. 

Regards,
Shawn.




For more options, visit https://groups.google.com/d/optout.

Luiz Menini

unread,
Mar 23, 2019, 8:53:20 PM3/23/19
to biodiver...@googlegroups.com
I did not notice this Format field...

But, another error message is shown.

image.png


Is it correct? Polygon shapefiles are not supported?

Thank you for your support!

Livre de vírus. www.avast.com.


For more options, visit https://groups.google.com/d/optout.

Shawn Laffan

unread,
Mar 23, 2019, 8:53:33 PM3/23/19
to biodiver...@googlegroups.com
...and now I look at the shapefile I see it is a polygon. 

Version 2.1 can only import data of type point.  You need to use the development version to import polygons. 

https://github.com/shawnlaffan/biodiverse/wiki/Downloads#development-release

See also (if you have not already) http://biodiverse-analysis-software.blogspot.com/2018/12/import-polygon-and-polyline-data.html

Regards,
Shawn.

For more options, visit https://groups.google.com/d/optout.

Shawn Laffan

unread,
Mar 23, 2019, 8:57:32 PM3/23/19
to biodiver...@googlegroups.com, Luiz Menini
It seems our emails passed each other in transit...

As per my other email, you need the development version to import polygons (until version 3 is released). 

Link for purposes of posterity:  https://groups.google.com/d/msg/biodiverse-users/xodR78gJiq0/idqk8p65AwAJ

Regards,
Shawn.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages