| View previous topic :: View next topic |
| Author |
Message |
Wondering Guest
|
Posted: Sat Apr 07, 2007 8:35 pm Post subject: SHP files and G32... |
|
|
I have some ESRI ".SHP" files and have written a routine to read the polygons (points are type double) into my program.
I want to use Graphics32 to display those polygons. But, G32 TPolygon32 uses TFixedPoint which uses type interger.
Anyone know how I can use vector polygons storing points as double with G32? |
|
| Back to top |
|
 |
willem van deursen Guest
|
Posted: Sat Apr 07, 2007 8:35 pm Post subject: Re: SHP files and G32... |
|
|
Wondering wrote:
| Quote: | I have some ESRI ".SHP" files and have written a routine to read the polygons (points are type double) into my program.
I want to use Graphics32 to display those polygons. But, G32 TPolygon32 uses TFixedPoint which uses type interger.
Anyone know how I can use vector polygons storing points as double with G32?
|
You have to scale down your shapefile polygons so that you are only
looking at the geographical extent you are interested in. Your polygons
have to be mapped to this extent, and in the process you will need to
round them to the pixel coordinates as integers. It will be something like
ScreenCoordinateX = Round((ShapeCoordinateX-MinX)/MapScale);
ScreenCoordinateY = Round((ShapeCoordinateY-MinY)/MapScale);
Take a look at DSpatial (http://dspatial.sourceforge.net/), ShapeLib
(http://www.triplexware.huckfinn.de/shpapi.html), or shape viewer
objects (http://www.ecostats.com/software/shapeviewer/svobjectsdelphi.htm)
Willem
--
Willem van Deursen, The Netherlands
wvandeursen_nospam (AT) nospam_carthago (DOT) nl
replace _nospam@nospam_ for @ to get a valid email address
www.carthago.nl |
|
| Back to top |
|
 |
Wondering Guest
|
Posted: Mon Apr 09, 2007 6:27 pm Post subject: Re: SHP files and G32... |
|
|
willem van deursen <xxx (AT) xxx (DOT) nl> wrote:
| Quote: |
ScreenCoordinateX = Round((ShapeCoordinateX-MinX)/MapScale);
ScreenCoordinateY = Round((ShapeCoordinateY-MinY)/MapScale);
|
Thanks for the info. |
|
| Back to top |
|
 |
Jo Black Guest
|
Posted: Mon Apr 09, 2007 10:05 pm Post subject: Re: SHP files and G32... |
|
|
Hi
can you please share some demo of SHP and Gr32
Thanks in Advance |
|
| Back to top |
|
 |
Jo Black Guest
|
Posted: Fri May 18, 2007 7:31 pm Post subject: Re: SHP files and G32... |
|
|
Wondering a écrit :
| Quote: | I have some ESRI ".SHP" files and have written a routine to read the polygons (points are type double) into my program.
I want to use Graphics32 to display those polygons. But, G32 TPolygon32 uses TFixedPoint which uses type interger.
Anyone know how I can use vector polygons storing points as double with G32?
Hi |
Can you please post a demo how to get the Data from the .Shp ???
or a lib to do it
Thanks |
|
| Back to top |
|
 |
|