liste

Bonjour et bienvenue dans mon site ! Willkommen auf meiner Seite! welcome in my homepage! http://assistance-en-sig.blogspot.com/ SIG ; Bases de données ; Géomatique; Python; ArcGIS; QGIS;

recherche

Showing posts with label shapefile. Show all posts
Showing posts with label shapefile. Show all posts

Sunday, November 10, 2013

pyshp: Python Shapefile Library

This library reads and writes ESRI Shapefiles in pure Python. You can read and write shp, shx, and dbf files with all types of geometry. Everything in the public ESRI shapefile specification is implemented. This library is compatible with Python versions 2.4 to 3.x.

Overview

This library reads and writes ESRI Shapefiles in pure Python. You can read and write shp, shx, and dbf files with all types of geometry. Everything in the public ESRI shapefile specification is implemented. This library is compatible with Python versions 2.4 to 3.x.

Get Started Instantly

  1. Download shapefile.py
  2. Start Python
  3. import shapefile
  4. Try one of the examples below
OR
Just run: easy_install pyshp
OR
pip install pyshp
If you are looking for information on .sbn and .sbx file formats some documentation is available here.

License

This library is released under the MIT license allowing it to be used for both commercial and non-commercial use. If your organization requires a different license for legal or policy reasons please contact the author through GeospatialPython.com.

Usage

The "Source" tab contains the SVN trunk with the latest release. Tagged releases representing relatively stable versions are also in the repository. The python module "shapefile.py" contains the complete library.
Detailed documentation and examples can be found in the Wiki as well as the "Download" tab. These files are different formats for the same information.
Below are minimal examples to give you a quick idea of what using the library "feels" like. More examples can also be found onGeospatialPython.com.
Important: For information about map projections, shapefiles, and Python please visit: http://code.google.com/p/pyshp/wiki/MapProjections

Reading Shapefiles

Reading Points in Shapes

>>> import shapefile>>> sf = shapefile.Reader("shapefiles/blockgroups")
>>> shapes = sf.shapes()
>>> # Read the bounding box from the 4th shape
>>> shapes[3].bbox[-122.485792, 37.786931000000003, -122.446285, 37.811019000000002]
>>>#  Read the 8th point in the 4th shape
>>> shapes[3].points[7]
[-122.471063, 37.787402999999998]

Reading Database Attributes

>>> # Read the field descriptors for the database file
>>> sf.fields[("DeletionFlag", "C", 1, 0), ["AREA", "N", 18, 5], ... ["BKG_KEY", "C", 12, 0], ["POP1990", "N", 9, 0], ["POP90_SQMI", "N", 10, 1], ... ["HOUSEHOLDS", "N", 9, 0], ... ["MALES", "N", 9, 0], ["FEMALES", "N", 9, 0]]
>>> # Read the 2nd and 3rd field values of the 4th database record
>>> sf.records[3][1:3]
['060750601001', 4715]

Writing Shapefiles

>>> import shapefile>>> # Make a point shapefile
>>> w = shapefile.Writer(shapefile.POINT)
>>> w.point(90.3, 30)
>>> w.point(92, 40)
>>> w.point(-122.4, 30)
>>> w.point(-90, 35.1)
>>> w.field('FIRST_FLD')
>>> w.field('SECOND_FLD','C','40')
>>> w.record('First','Point')
>>> w.record('Second','Point')
>>> w.record('Third','Point')
>>> w.record('Fourth','Point')
>>> w.save('shapefiles/test/point')
>>> # Create a polygon shapefile
>>> w = shapefile.Writer(shapefile.POLYGON)
>>> w.poly(parts=[[[1,5],[5,5],[5,1],[3,3],[1,1]]])
>>> w.field('FIRST_FLD','C','40')
>>> w.field('SECOND_FLD','C','40')
>>> w.record('First','Polygon')
>>> w.save('shapefiles/test/polygon')

Tests

The above examples are very simple. There are many other shortcuts/features listed in the longer usage examples.
The file "README.txt" is a doctest module containing basic tests which are called if you run "shapefile.py" directly instead of importing it.
The sample shapefile used in the test and the output directory structure are in the "shapefiles" directory in the trunk.
Bug reports, fixes, improvements are welcome
Commercial support is available from NVision Solutions

Wednesday, October 30, 2013

Download BMW Road Map Europe MOVE 2014

BMW Road Map Europe MOVE 2014

This USB-update is only for BMW Navigation System Business (SA 606) with a CHAMP2 HDD-System (Car Infotainment Computer). 

Installation directions:

Unpack the archive using WinRAR and read the Instructions.txt, you will need an FSC code to load the maps into the car. You can get one from your local BMW Dealership or you can contact anyone which can generate an FSC code for you.

If you need, I can do this for you. My email is dracon@gmail.com

You can find other map updates for other BMW Navigation Systems (CIC, CHAMP2, NBT, CCC) at the URL below.
      
http://thepiratebay.sx/user/lrddracon  

If you have a map that's not on that list, let me know. I'll give an FSC code to anyone that contacts me and uploads a map I don't have

Download here

GIS Data & Maps (ESRI) -- Canada, Mexico, USA, World (CD2)

.shp, .lyr, .tif  for free
.shp can be viewed with most free GIS programs, including qgis, www.qgis.org, .lyr is proprietary and can only be viewed (as far as i know) with ESRI software, their free viewer (ArcExplorer) cannot view .lyr. .lyr's main purpose is to hold metadata, such as color and labels, so there is no info in them that is different than the info in the shapefiles.
download here

Monday, April 22, 2013

Difference Between KML and KMZ


KML vs KMZ
Both KML and KMZ are file extensions used in Google applications, most specifically Google Earth and Google Maps. A person who uses these two Google applications can encounter a lot of file formats, and KML and KMZ file formats are included in the list of file formats honored by the applications.
Both KML and KMZ files are compatible and can be opened by Google Earth and Google Maps – two Google applications that deal with geographic images.
KML is an acronym for “Keyhole Markup Language” that Google and Keyhole, Inc. developed. It is a geographic Information system format. KML contains a lot of graphics and features that can include placemarks, images, polygons, 3D models, textual descriptions, and others. A KML file can be created using Google Earth. If the said Google application is not downloaded or installed, it is impossible to create this type of file. A user can set the longitude (the Earth’s imaginary lines that runs from north to south) and latitude (the same imaginary lines that runs from east to west) on the Google Earth application, and it can create the KML for that user.
After creating and saving the KML file, it can be compressed. The compressed file is now called a KMZ file. Since most of the map images can be large in terms of file size and can take a lot of file space, a KMZ file has all the information that a KML file has with a little difference in size and more ease in data transfer.
If KML files deal with a lot of graphics and features, KMZ deals with placemarks. Placemarks or special pointers indicate the existence of special locations. Special locations can include museums, shopping areas, famous landmarks, or leisure places among others. Both extension files are used to store images and data during other types of navigation purposes. This is often the case. Users can easily do this by entering the area location into Google Earth and saving the data and image as a KML or KMZ file. The file is then transferred or uploaded into a mobile phone wherein Google Maps, another Google application, is also installed. The file is then download into Google Maps which reads the saved file in an online interface. The user can now use the saved information, like specific instructions on how to navigate and travel to a certain area.
It is often advisable to use KML files instead of KMZ files. Google Earth and Google Maps will have no problem recognizing the two files, but some programs might not be compatible and will not be able to read the KMZ file. The KMZ file can be imported but with significant errors. Though KMZ is much preferred due to its lower size and faster download and upload time, the information will be meaningless and useless to the user if the file cannot be recognized and opened.
If this problem occurred, a KMZ file can still be reverted back to a KML file by the use of a file expander or any program that unzips or decompresses compressed files.
Summary:
1.“KML” stands for “Keyhole Markup Language” while “KMZ” stands for “Keyhole Markup Language Zipped.”
2.The KML is the file extension for the unzipped file, and KMZ is the zipped file of the KML.
3.KML is used to save and store map locations in general while KMZ is used in the same capacity for more specific locations like placemarks.
4.KML has a larger file space and longer data transfer compared to KMZ. As a compressed or zipped file, KMZ has a smaller file space and size.
5.KML can be read and recognized by many geobrowsers or programs that run maps and images like Google Earth and Google Maps. This sometimes does not hold true for KMZ.
convert shapefile to kml, shapefile to kml, convert kml to shapefile, kml to shp, shape to kml

Friday, December 7, 2012

Download free shapefile maps


Thousands of shapefile maps can be downloaded for free from the following websites, including country shapefiles, shapefiles at province or state level, and other administrative boundaries maps. The shapefile (or ESRI shapefile) format is a geospatial vector format and one of the most common (if not the most common) map format.
Shapefile maps can be loaded into StatPlanet Lite and StatPlanet Plus to create interactive shapefile maps (see also: setting up a shapefile map). Please note that you need to download the map files in the ".SHP" format to load them into StatPlanet.
  • Natural Earth - world maps - Excellent world shapefile maps with national boundaries, first order admin (provinces, states, etc.), disputed areas, coastlines, populated areas and more at various scale levels.
  • Map Library - Country shapefile maps in the public domain. The World Bank alternative below sometimes has better maps, but not for as many countries.
  • United Nations - UN-SALB (Second Administrative Level Boundaries) data set project. These maps are free but copyright rests with the UN. The maps are validated by the National Mapping Agencies (NMA) of each UN Member State. This website requires registration to download the maps.
  • Geocommons - A huge database of user submitted maps. Search for any kind of map, then downlooad the shapefile as follows: click on 'Details' (not 'View map'). Select a dataset listed below. To download the shapefiles, select the 'Shapefile' button shown to the right of the map.
  • World Bank - Country shapefiles can be downloaded through the World Bank's Mapping platform as follows: Click on 'explore countries' to select a country, click on 'download' in the top-right corner, and select 'Indicators (shapefile)'. This option is not available for all countries.
  • MapCruzin - A great source for all kinds of shapefiles.
  • Open Street Map - A growing collection of shapefile map downloads by continent, region and country. These maps are community edited and are not always complete. Shapefiles by country are also available from VDS tech.
  • US Census Bureau - USA County and District Cartographic Boundary Files.

Satisfied with this article? Thanks for making a donation by clicking some ads
satisfait de cet article? merci de faire un don en cliquant quelques liens publicitaires

Saturday, December 1, 2012

Tutorial AutoCad to ArcMap and ArcMap to AutoCAD


Module content

This tutorial will cover how to bring a .dwg AutoCAD file into ArcMap and how to export ArcMap layers
for use in AutoCAD

Adding an AutoCAD file to an ArcMap Project

AutoCAD files can be directly added to an ArcMap project. When saving your .dwg file in AutoCAD
make sure that there are no spaces in the file name, for example Autocadfile.dwg. Save the .dwg in
one of your ArcMap project folders. In this case we will add an Ordnance Survey .dwg file to our
ArcMap project.

Open the .mxd project that you want to add the AutoCAD file to. Select Add Data and navigate to
the AutoCAD file you want to add. Select the .dwg file and click Add. 

download the full tutorial here

If you find this tutorial useful thanks for sharing this page and making a donation by clicking of one of the ads Si vous trouvez ce tutorial utile merci de nous faire un don en cliquant sur un des liens publicitaire



Download Google Earth KML and KMZ to SHP converter

Need of transferring Google Earth Data to a GIS? Kml2shp transforms KML 
files into ESRI Shapefiles.

The KML file could contain Points, Paths and Polygons. When creating SHP 
files the information is separated into thematic layers.

For each shapefile (shp), an attributes table (dbf) and index file (shx) are 
created.

The kml to shp conversion consists of three steps:

1) Open KML file
2) Choose Shape Type
3) Select output Shapefile name

Optionally, you can change from WGS84 to a local datum and from Lat/Lon to 
UTM.

Also, Kml2shp can export to AutoCAD (DXF) and GPS (GPX)



Download a very useful and simple software to convert your KML or KMZ file (From Google Earth) to Esri   Shapefile (SHP)

Download here



Convert Google Earth data to a Shapefile

Tested with:
Firefox 3.5 (Windows, Linux and MAC OS)
Safari 4 (Windows, MAC OS),
Google Chrome (Windows, MAC OS)

SHP Files created by this tool work properly with ArcGIS

If you find this page useful thanks for making a donation by clicking 2 Ads (Adsense)
Si vous trouvez cette page utile veuillez la partager et faire un petit don en cliquant un des liens publicitaires (Ads) Merci

convert shapefile to kml, shapefile to kml, convert kml to shapefile, kml to shp, shape to kml

Friday, October 26, 2012

GIS Training with QGIS - Exercise 3: Adding External data


1. Using Openoffice.org Calc to create a table of capture data
 a) Create the following columns: Trap_ID, Date, Captures, FTD.
 b) Enter trap numbers from 10-30 for three different dates in December.
• Enter random values for capture data.
• Calculate Flies/Trap/Day (FTD) as captures/14  (each trap is checked once every two
weeks)
• You should have 60 rows of data, 20 rows for each date.
 c) Use “Data Pilot” (or “Pivot Table” in Excel) to create a new table (in a new sheet)
• Trap_ID in the first column, and dates in each successive column and FTD data in the
table.
• This new table will have 4 columns (TrapID, and three columns for the three dates) and
20 rows, one for each Trap_ID.
 d) Enter a new set of column headers in the top row:
• Trap_ID in the first column, and for the date columns enter:“FTD_ddmm” (where
dd=day, mm=month)
• Remove the original column header from the pivot table
 e) Export the new table to a dbf format file (in Geodata\Exercises directory). Name the
dbf file trap_data.dbf.
 2. Merge data into a shapefile
 a) Start a new QGIS project and load the traps shapefile from Geodata\fruitfly.
 b) Use the Tool plugin: Vector-> Data Management->Join Attribute data to attach
the above dbf file to the traps GIS layer. The column “Trap_ID” from the trap_data dbf
file will connect to the Trap_ID column in the traps layer. Name the new shapefile
traps_ftd.shp
 c) Open the attribute table of traps_ftd and verify that the attribute columns of FTD data are
available for all dates.
 d) Display the traps_ftd layer with “Graduated symbol” so that higher FTD values display as
larger circles. Choose to classify into 5 categories, and switch between each of the date
columns to display FTD for each date.
 e) When you find a suitable symbology for the FTD data, save as a QGIS style file. Name the
file standard_ftd_style.qml