Giter Site home page Giter Site logo

arcshapefile's Introduction

ArcShapeFile

A C# library to read and write ESRI Shapefiles

The ESRI Shapefile format is a commonly shared geographic data format. This is my attempt to read and write to it. The set of C# classes that make up the DLL allow you to read and create both the vector/point data and the associated attribute record. The source code comes with a reasonably comprehensive help file that includes code C# and VB.Net examples.

Background

The Shapefile format first made it's appearence back in the 1980's.ย  Despite it's limitations it remains a standard format for moving data between GIS systems. Essentially the format as described in the ESRI Shapefile Technical Description consists on three files

  • .shp - holds the vertice data (x, y and in some cases z and measure values)
  • .shx - contains the offset and length of each record in the .shp
  • .dbf - contains the attribute data for each record. This file is based on the old Ashton Tate dBASE III format, though without memo field support so text fields are limited to 254 characters and the field names are limited to 10 characters

A further limitation of the ShapeFile format is that each Shapefile can only contain one type of shape (i.e. all points or all lines or all polygons). There is one exception and that is you can have a null record to act as a placeholder within the Shapefile structure.

Additionally I've added support for the .prj file. This is a WKT file holding the projection information - handy when you want to use this data in different systems as most seem to recognise it. I've also added support of the .cfg codepage file, though this still in the development phase and may need some additional work.

I originally developed this code in VS 2005 so I've keep the style (relatively) simple - no vars, just explicit dimensioning and no LINQ (though that meant I had to write my own query parser) - so you should be able to easily import the code into any VS version and run it as is.

arcshapefile's People

Contributors

rosspickard avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.