Friend, the research was great and I got great results!
Today there are already solutions for this, so I analyzed several and several and I ended up finding several solutions, however, you will need a greater effort to reach the level you want!
Currently the files are not summarized only in .SHP
, updated today:
SHP: The graphical data
SHX: The index
DBF: Attribute data
The easiest solution today is the library Shapelib (ShpAPI129.pas
& shapelib.dll
).
Functional for the Delphi 7, you will find some problem in some of its functions, mainly at the time of opening the files, but I will already pass the tip!
I’m not sure which version of Delphi has since been modified, but I assure you that Delphi 2009 from the Default is Unicode characters
, therefore, in the call functions of the library you need to change:
Function SHPOpen (pszShapeFile: PChar; pszAccess: PChar): SHPHandle; cdecl; external LibName name '_SHPOpen';
//para:
Function SHPOpen (pszShapeFile: PAnsiChar; pszAccess: PAnsiChar): SHPHandle; cdecl; external LibName name '_SHPOpen';
//observe a mudança do PChar para PAnsiChar
If you do not make the above mentioned change, the return of the function will be nil
.
In the version Delphi 7 works without the conversion!
Here a project is stopped, but several tools and examples are still available: Cartovcl
In English, but super useful to increase knowledge: Delphi Gis Wiki
Abandoned topic from a forum on the subject: Pointinshapefile and Shape Fill with Delphi
only a doubt . shp is the format Shapefile Shape or Autocad?
– Guilherme Nascimento
the . shp format that can be done in auto Cad, gps and other...
– Guilherme Lima
To begin, and I am interested in helping you rsrsrsrs,edit the question and post a part of the file, and if possible inform what you want with this data, whether it will save in database, etc., If I do not find something to adapt to you, we will develop from Zero a solution, of course the information I asked for is crucial to such an approach!
– Junior Moreira
Okay, I’ll rephrase the question.
– Guilherme Lima