Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-devel] GDAL and JAI

Yes, I think step 1 will be setting 2 anchor points on the image (not necessarily top-right and bottom-left, just any 2 points that the user can easily distinguish) and marking where those same 2 points should be on the main background map. Then I could probably do some JAI affine warp to automatically make the image fit on the map without the user needing to fiddle with it (at least I think I can). I may also have a mode where the user can do it all manually (rotate, stretch, warp) if they don't like the auto results.

Good idea on using the glass pane, that might be better than having each image on it's own layer.

Graham.


Paul Ramsey wrote:
Two points, and you're either in "bottom left" or "top right" mode.
That gives you position, scale and rotation. You're probably not even
going to *need* sheer, which means you're not even using all the terms
of an affine.

The hardest part of getting a rational UI will probably step #1,
before you have any information at all about where to put things.
Perhaps step one, is, "tell me where the bottom-left and top-right
are". At that point you can paint the image on and proceed to the fine
manipulation. Worst case, you can paint it into Emily's glass pane,
right? You don't even need to give it an official "Layer".

P.

On Wed, Nov 12, 2008 at 8:26 AM, Graham Davis <gdavis@xxxxxxxxxxxxxxx> wrote:
Thanks Jan and others,
.
I will take a look at what you've done and see if I can leverage it for this
project.  I'll be sure to send you any questions that I may have as I go
through it.  As for my UI, I'm really looking to do something simple.
 Something similar to what Adrian described, with picking "anchor" points
and visually dragging/stretching the image.  But I'll need to play around
with it a bit before I know what exactly will or won't work.

Graham.



Jan Jezek wrote:
Hi Graham,

I've done something that might be useful during Google Summer of Code
2006/07. It's little bit out of date so I'm just trying to put the udig
plugin (that includes raster support) into the shape in the repo.

In the short I've made few 'MathTransformBuilder' objects, that calculates
you proper transformation from set of ground control point (using LSM).
You can calculate linear method like Similar, Affine, Projective or
warping methods like 'rubber sheeting' or GridBased methods and then you are
able to apply it on the vector or raster. For rasters I tried to use
extended JAI WarpTransform2D to apply warping methods but this work has not
been committed to GeoTools trunk yet.

Some (little bit out of date) documentation is here:

http://geotools.codehaus.org/New+Transformation+Algorithms+for+GeoTools+and+uDig

Some methods are already committed under
GeoTools/Referencig/operation/builder sub package (mostly the linear ones  -
should work for rasters as well as vectors).

Some code (still waiting for trunk) is here (it includes the raster
support for warping algorithms):
http://gtsvn.refractions.net/trunk/spike/jan/gsoc-transformations/

I'll try to ensure that everything is up to date during todays evening and
then I send you the link for simple plugin that should work for trunk. Best
regards,

Jan.





______________________________________________________________

Od: gdavis@xxxxxxxxxxxxxxx
Komu: User-friendly Desktop Internet GIS
&lt;udig-devel@xxxxxxxxxxxxxxxxxxxxx&gt;
Datum: 10.11.2008 22:58
Předmět: [udig-devel] GDAL and JAI

Hi,

I'm looking into making a small module in uDig for image manipulation.
 Basically my client wants to take an aerial photo and place it overtop of a
satellite base layer.  They want to be able to manually manipulate this
photo and visually fit it onto the correct spot of the map.  The
manipulation they want to be able to achieve includes shrinking/growing the
image, rotating it and morphing it to align correctly.  Ideally this would
be done in real-time with the user manipulating  the image with their mouse
and maybe some numerical input.  Once the user is satisfied with their
approximate placement, they can "lock it in" at which point I will save the
resulting image and its coordinates as a geotiff.

I am currently looking at JAI and GDAL to see if these sorts of image
manipulation functions are available.  I haven't used either library very
extensively, so it is pretty new to me.  The GDAL documentation seems to be
pretty light in general (at least for Java and GeoTools).  I've only found
these resources:

- http://docs.codehaus.org/display/GEOTOOLS/ImageIO-EXT+GDAL
- http://trac.osgeo.org/gdal/wiki/GdalOgrInJava

Does anyone know of other helpful resources that I could use for this
project?  Are there any uDig modules that currently do anything like this,
with example code I could look at?  Or perhaps someone has some suggestions
for how I might approach this so that it fits nicely with current uDig
designs?  If this functionality sounds useful to others, I'm all for trying
to make this module "official".  Thanks,

-- Graham Davis
Refractions Research Inc.
gdavis@xxxxxxxxxxxxxxx

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel


--
Graham Davis
Refractions Research Inc.
gdavis@xxxxxxxxxxxxxxx

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel



--
Graham Davis
Refractions Research Inc.
gdavis@xxxxxxxxxxxxxxx



Back to the top