Re: [postgis-users] Importing timezone shape files - newbie
Hi all, I'm using PG 9.1.3 with pgAdmin 1.14.2 on Windows 7 Home Edition to get familiar with PostGIS and TimeZone data. PostGIS 1.5.3 is installed and the postgis database was created by the installer. My immediate end goal is to be able to take a Lat/Lon and query PG to find the correct time zone for the location. I installed the PostGIS Shapefile and DBF loader plugin in pgAdmin but it is greyed out in the Plugins menu. I found this site with the shape files: http://efele.net/maps/tz/world/ It has two shape files: The tz_world shapefile captures the boundaries of the TZ timezones across the world, as of TZ 2011b. The geometries are all POLYGONs, and a TZ timezone will sometimes have multiple polygons. There are about 28,000 rows. The tz_world_mp shapefile captures the same boundaries. The geometries are either POLYGONs or MULTIPOLYGONs, and there is a single geometry for each TZ timezone. There are 394 rows. First question is, Which shape file to use. I don't understand the difference between the two and the merits of each. Secondly, clues on how to import this data correctly. Any other pointers are welcome! I'm not sure yet, how to do the SQL to make the query. Thanks! Scott Hi Scott, Can't tell which file is better. It really depends on what you want to do. Concerning loading file to postgis, you can use the command line shp2pgsql program: shp2pgsql -IiDS -s 4326 -g geom tz_world.shp timezone | psql gis20 (running shp2pgsql without arguments will give you the list of available switches). Nicolas ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Importing timezone shape files - newbie
Can someone explain the difference between the two types of shape files and the advantages/disadvantages of each in more general terms? As far as I understandd from http://efele.net/maps/tz/world/: and a TZ timezone will sometimes have multiple polygons. for the first file, and and there is a single geometry for each TZ timezone for the second one. The big shapefile contains one multipolygon by timezone and by country, the small one contains one polygon for each part of a country (islands for instance) for each timezone, thus the count difference . nicolas ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Importing timezone shape files - newbie
What does that mean in use? I'm not familiar with this stuff yet. :) On Thu, Apr 5, 2012 at 9:41 AM, Nicolas Ribot nicolas.ri...@gmail.com wrote: Can someone explain the difference between the two types of shape files and the advantages/disadvantages of each in more general terms? As far as I understandd from http://efele.net/maps/tz/world/: and a TZ timezone will sometimes have multiple polygons. for the first file, and and there is a single geometry for each TZ timezone for the second one. The big shapefile contains one multipolygon by timezone and by country, the small one contains one polygon for each part of a country (islands for instance) for each timezone, thus the count difference . nicolas ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
Re: [postgis-users] Importing timezone shape files - newbie
Scott, It's greyed out if you don't have a database selected. As long as your database has postgis installed, it should work fine. Regarding world files as I recall, I think the 394 one has one record per TZ, and the other has further broken out. I usually use the 28,000 one for spatial queries since its a bit more efficient because it has smaller polygons. Good luck :) Leo http://www.postgis.us -Original Message- From: postgis-users-boun...@postgis.refractions.net [mailto:postgis-users-boun...@postgis.refractions.net] On Behalf Of Scott Chapman Sent: Wednesday, April 04, 2012 6:07 PM To: postgis-users@postgis.refractions.net Subject: [postgis-users] Importing timezone shape files - newbie Hi all, I'm using PG 9.1.3 with pgAdmin 1.14.2 on Windows 7 Home Edition to get familiar with PostGIS and TimeZone data. PostGIS 1.5.3 is installed and the postgis database was created by the installer. My immediate end goal is to be able to take a Lat/Lon and query PG to find the correct time zone for the location. I installed the PostGIS Shapefile and DBF loader plugin in pgAdmin but it is greyed out in the Plugins menu. I found this site with the shape files: http://efele.net/maps/tz/world/ It has two shape files: The tz_world shapefile captures the boundaries of the TZ timezones across the world, as of TZ 2011b. The geometries are all POLYGONs, and a TZ timezone will sometimes have multiple polygons. There are about 28,000 rows. The tz_world_mp shapefile captures the same boundaries. The geometries are either POLYGONs or MULTIPOLYGONs, and there is a single geometry for each TZ timezone. There are 394 rows. First question is, Which shape file to use. I don't understand the difference between the two and the merits of each. Secondly, clues on how to import this data correctly. Any other pointers are welcome! I'm not sure yet, how to do the SQL to make the query. Thanks! Scott ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users
[postgis-users] Importing timezone shape files - newbie
Hi all, I'm using PG 9.1.3 with pgAdmin 1.14.2 on Windows 7 Home Edition to get familiar with PostGIS and TimeZone data. PostGIS 1.5.3 is installed and the postgis database was created by the installer. My immediate end goal is to be able to take a Lat/Lon and query PG to find the correct time zone for the location. I installed the PostGIS Shapefile and DBF loader plugin in pgAdmin but it is greyed out in the Plugins menu. I found this site with the shape files: http://efele.net/maps/tz/world/ It has two shape files: The tz_world shapefile captures the boundaries of the TZ timezones across the world, as of TZ 2011b. The geometries are all POLYGONs, and a TZ timezone will sometimes have multiple polygons. There are about 28,000 rows. The tz_world_mp shapefile captures the same boundaries. The geometries are either POLYGONs or MULTIPOLYGONs, and there is a single geometry for each TZ timezone. There are 394 rows. First question is, Which shape file to use. I don't understand the difference between the two and the merits of each. Secondly, clues on how to import this data correctly. Any other pointers are welcome! I'm not sure yet, how to do the SQL to make the query. Thanks! Scott ___ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users