[Live-demo] [OSGeo] #689: NaturalEarth Character Encodings

OSGeo trac_osgeo at osgeo.org
Wed Aug 8 14:12:47 PDT 2012


#689: NaturalEarth Character Encodings
-----------------------+----------------------------------------------------
 Reporter:  darkblueb  |       Owner:  darkblueb                        
     Type:  defect     |      Status:  new                              
 Priority:  normal     |   Milestone:  OSGeoLive6.5                     
Component:  LiveDVD    |    Keywords:  4.5beta3, natural earth, upstream
-----------------------+----------------------------------------------------

Comment(by nvkelso):

 Windows 1252 is the default encoding for (most) SHP files and Natural
 Earth distributes there. Windows 1252 should not be confused with
 ISO_8859-1, they are different and Natural Earth will never be distributed
 via that ISO standard.

 The admin-1 are special as the native (master) GeoDB file is in UTF-8, but
 ArcMap does a poor mapping onto Windows-1252 when it exports to SHP.

 However, now that OGR has bindings for GeoDB, we can export a UTF-8
 version, along side the Windows-1252 version.

 FYI: Natural Earth 2.0 (forthcoming) includes PostGIS data dump and script
 for importing all these, with the proper OGR to turn them into UTF-8 prior
 to import.

 This can be previewed here:

 https://github.com/nvkelso/natural-earth-vector/tree/master/tools/make-
 web-mercator-900913-ready/

 and

 https://github.com/nvkelso/natural-earth-vector/blob/master/tools/make-
 web-mercator-900913-ready/zip-it.sh

 where:

 ogr2ogr \
     --config OGR_ENABLE_PARTIAL_REPROJECTION TRUE --config SHAPE_ENCODING
 WINDOWS-1252 \
     -t_srs "$P900913" -lco ENCODING=UTF-8 -clipsrc $EXTENT -segmentize 1
 -skipfailures \
     $base.shp $shapefile

 note the encoding bits.

 hoping to have the 2.0 pushed by the 18th of this month, the topology has
 been a bitch to fix.

 _n

-- 
Ticket URL: <https://trac.osgeo.org/osgeo/ticket/689#comment:6>
OSGeo <http://www.osgeo.org/>
OSGeo committee and general foundation issue tracker.


More information about the Osgeolive mailing list