My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
SHP  

Featured
Updated Feb 4, 2010 by edwin.va...@gmail.com

SHP (ESRI Shapefile Reader)

Description

SHP is an ActionScript 3 library for parsing ESRI Shapefiles. The current version has support for the following Shape Record types:

  • Point
  • PointZ
  • Polygon
  • Polyline

Download

The current release is Beta 0.1. It can be obtained using SVN:

svn checkout http://vanrijkom-flashlibs.googlecode.com/svn/trunk/org/vanrijkom/shp

More info

Comment by jbell...@unog.ch, Nov 9, 2007

Neat work with great potential. Would like to use for a flex project. Any chance to get access to samples and API documentation (link is dead).

Comment by ady...@gmail.com, Apr 27, 2008

Yeah, can we see those samples? Would love to use this....

Comment by roame...@gmail.com, Jun 16, 2008

No api , no source ....

Comment by ady...@gmail.com, Aug 25, 2008

This has been dead for MONTHS now... what gives?

Comment by frans.ba...@gmail.com, Sep 12, 2008
Comment by gaiko...@gmail.com, Sep 23, 2008

Thanks for the tip. Just wonder how to use this example. do i need to compile the code to a swf file or any class? Please help!

Comment by dsl...@gmail.com, Apr 29, 2009

I created an example of using these classes with Adobe Air, and the Google Maps API for Flash/Flex/Air. Available here: http://www.boxshapedworld.com/blog/post/Shapefiles-Actionscript-30-and-Google-Maps.aspx

Comment by ovie.asy...@gmail.com, Jun 10, 2009

thx to dslamb! ur post really helps! :)

Comment by markuswa...@gmail.com, Feb 3, 2010

Fine, now i can attach my shapefiles, but what can i do if i want to add markers to my map? i just got the longitude/latitude from the markers

Comment by foo...@suremail.info, Apr 22, 2010

You can find another tutorial demonstrating the usage of the SHP library here: http://vis4.net/blog/2010/04/reading-shapefiles-in-as3/

Comment by jrachel....@gmail.com, May 11, 2010

This is fantastic. Two things: 1) the ability to read a .prj file and turn it into a wkid (number) 2) if you try to take the types shpPolygon, shpPolyline, etc and put them through a geometry service, to project the shapefile before you add it as graphics to the map, it will die. So it would be great to have a class/utility that turns the shpPolygon (etc) into a native flex api Geometry supported by GeometryService?::Project. for instance:

private function convertShpPolygonToPolygon(shpPlygon:ShpPolygon?, wkid:Number):Polygon {
var plygon:Polygon = new Polygon(); var shpRings:Array = shpPlygon.rings0?; var ptArray:Array = ; var ringArray:Array = ; var spatref:SpatialReference? = new SpatialReference?(wkid); for(var i:Number = 0; i < shpRings.length; i++) {
var pt:MapPoint? = new MapPoint?(shpRingsi?.x, shpRingsi?.y, spatref); ptArray.push(pt);
} ringArray.push(ptArray); plygon.rings = ringArray; plygon.spatialReference = spatref; return plygon;
}
Comment by lynx...@gmail.com, Aug 25, 2010

Wondering if this will allow for holes in polygons?


Sign in to add a comment
Powered by Google Project Hosting