[GIS] PostGIS importing shapefile error w/ official manager

postgisshapefile

I'm having some trouble when trying to import an shapefile of the Sao Paulo Brazil's state (I downloaded it from the web and I'm using the own PostGis manager to import it).

Here's an image!

enter image description here

The connection is already on.

In the "Options" menu, i had to change from "UTF8" to LATIN1, cause if I didn't, I'd get this error message: "Unable to convert field name to UTF-8 (iconv reports "Illegal byte sequence"). Current encoding is "UTF-8". Try "LATIN1" (Western European), or one of the values described at http://www.gnu.org/software/libiconv/."

I also wanted to now what is SRID and wich value should i put there.

When I changed to LATIN1, I get this other error message: "Failed in pgui_exec(): ERRO: sequência de bytes é inválida para codificação "UTF8": 0xe3 0xa7 0xe3". In english, it says the byte sequence is not valid to UTF8 codification.

I'm a bit desperate cause I've never used GIS before.

Best Answer

I was having a similar issue and I used the -W "latin1" option and when using and it took care of my issues:

shp2pgsql  -I -W "latin1" -s 3857 mgau2013v6_0/agebs_urbanos_2013.shp public.mexico_shape_data | psql -d osm

I found that this was a helpful reference for the syntax: http://www.bostongis.com/pgsql2shp_shp2pgsql_quickguide.bqg

Related Question