I am looking for a large
sample dataset (preferably in csv format) that has lat/lng
coordinates.
PostgreSQL,PostGIS
I am looking for a large
sample dataset (preferably in csv format) that has lat/lng
coordinates.
PostgreSQL,PostGIS
One liner will generate the data in sql:
test=# select POINT(random()*180-90, random()*90-45)from generate_series(1,5);
point
--------------------------------------
(79.7833853960037,27.2689918940887)
(27.6489242445678,-9.43540174048394)
(-51.9591500423849,19.2025181371719)
(83.5859301500022,31.8948447704315)
(-56.1149036698043,42.5037826504558)
(5 rows)
You could easily add this query to an insert statement and add the right Postgis function for the geometry if necessary. Last number '5' of course controls how many lines will be generated.
Simulations of database activity based on random data tend not to be realistic, so be wary of any load or query testing you do with it. If you actually want examples of real coordinates, the data sets available from OpenStreetMap are certainly big. Importing the TIGER/Line Shapefiles is one of the best single sets of sample data like this around, and is probably easier to deal with than the ones that have been converted to OSM formats.
This CSV file has 228500 lat/long couples representing real-life points of interest (tourism attractions/etc) in all countries:
http://datahub.io/dataset/wikivoyage-listings-as-csv
License is CC-BY-SA.
Following my comment, you can use this html page to generate as many points as you want.