Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am writing a VBA code to resize my polygon, I get a input as vector points(Shape file). The code below resizes it as according to my scale factor but my central latitude and longitude are also distorted. I want my new polygon to have the same central lat and long as of the orignal shape file. As if its overlaid.

lVct = LBound(vct)
uVct = UBound(vct)

ScaleFactor = 0.59  
j = 0
i = 1
Set PPolygon = New Polygon
 For i = lVct To uVct
          vct(i).y = vct(i).y * ScaleFactor
          vct(i).x = vct(i).x * ScaleFactor
          PPolygon.addPairOfCoordinates vct(i).y, vct(i).x   'add coordiantes into the new Polygons

  Next i

Describe if I have to use to some coordinate reference system or projections !!!

share|improve this question

2 Answers 2

Copy the polygon.

Normalize the polygon by subtracting the center values from every point.

Scale the normalized polygon in the manner you describe.

Add the center values back to every point.

If the data is in lat/lon, you may get better results if you first project it (to any planar system you like) then scale as I've described then deproject.

share|improve this answer

You could use the ITransform2D interface, it has a scale method.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.