Any ideas on how to draw a property boundary on an aerial photo? RRS feed

  • Question

  • User-2100942636 posted
    I have an aerial image and I would like to draw the property lines on that image.

    Does anyone have any ideas on the best way to accomplish this?

    Friday, October 21, 2005 10:01 AM

All replies

  • User1152494133 posted
    You will need to know the geocodes of the photo's corners (lat/long of each corner) and the geocodes of each vertex of the property's shape.

    Given this information, you should be able to convert geocodes into the X/Y coordinates of pixels within the photo.  Assuming that the photo is not zoomed out too far, you should be able to use regular/linear math (instead of spherical math) with little error.

    For the graphics part, you first load your photo into an Image object.  You then need to get a Graphics object using Graphics.FromImage().  You can then use Graphics.DrawLine() (or something similar) to connect the dots of the property region.  The image object will then contain the original photo with your lines drawn over the top of it (and you can save it, etc).
    Thursday, October 27, 2005 11:09 AM
  • User-2100942636 posted

    Thanks for the input Jason.

    Do you happen to know of any GPS Software that will work in conjunction with ASP.Net 2.0 that may make inporting Lat/Long a little easier?

    Thursday, October 27, 2005 11:47 AM
  • User-2100942636 posted
    Also, Is there a way to draw arcs on the image or do you just have to use a series of small lines?

    Thanks again for your help.
    Thursday, October 27, 2005 11:52 AM
  • User1152494133 posted
    There is a method to draw arcs. 

    Here is a link into the documentation for the Graphics object: 

    Note: I misread your post (hey, it's early here).  I typed up the following description because I thought that you were asking for GIS software, but after re-reading, I realized that you were asking for GPS software.  It seems like a waste of a perfectly good description, so I'm going to leave it.  But, to answer your question, no I do not have any first-hand experience with GPS per se.

    And, I'm not sure if you'll need a GIS package to do what you describe, given that you have the property points defined in geo-coordinates.

    As I said above, you'll need to know what area your photo represents.  For example:

    Pixel        Geo-coordinates
    ----------   ---------------
    (0, 0)     = 45.1, -85.24
    (640, 0)   = 45.9, -85.24
    (0, 480)   = 45.1, -85.6
    (640, 480) = 45.9, -85.6

    So, the width of the photo is 0.8 geo units spread across 640 pixels, and the height is 0.36 geo units spread across 480 pixels.

    You can use linear math to figure out a pixel within the photo for any given geocode:


    45.2, -85.5

    To figure out the X coordinate:   

    45.2 - 45.1 = 0.1     (this finds the delta)
    0.1 / 0.8 = 0.125     (this finds the percentage)
    0.125 * 640 = 80     (this calculates the X coordinate)

    To figure out the Y coordinate:

    -85.24 - (-85.5) = 0.26
    0.26 / 0.36 = 0.7222
    0.7222 * 480 = 346.656

    So in this example, the geocode 45.2, -85.5  will correspond to the pixel on the photo of 80, 346.656  (floating point is allowed)

    Friday, October 28, 2005 7:30 AM
  • User-2100942636 posted

    Thanks a lot for all your help.

    Thanks for keeping that description in your post, it was indeed helpful.
    Friday, October 28, 2005 7:40 AM