BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SHP files and G32...

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics
View previous topic :: View next topic  
Author Message
Wondering
Guest





PostPosted: Sat Apr 07, 2007 8:35 pm    Post subject: SHP files and G32... Reply with 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?
Back to top
willem van deursen
Guest





PostPosted: Sat Apr 07, 2007 8:35 pm    Post subject: Re: SHP files and G32... Reply with quote



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





PostPosted: Mon Apr 09, 2007 6:27 pm    Post subject: Re: SHP files and G32... Reply with quote



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





PostPosted: Mon Apr 09, 2007 10:05 pm    Post subject: Re: SHP files and G32... Reply with quote

Hi
can you please share some demo of SHP and Gr32

Thanks in Advance
Back to top
Jo Black
Guest





PostPosted: Fri May 18, 2007 7:31 pm    Post subject: Re: SHP files and G32... Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Graphics All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.