World Wind Forums

Go Back   World Wind Forums > WorldWind Development (Other) > Add-on & Script Development

Add-on & Script Development Creating add-ons and scripts for World Wind.

Reply
 
Thread Tools Display Modes
Old 11-02-2005, 08:59 PM   #1
geodan
World Wind Developer
 
geodan's Avatar
 
Join Date: Aug 2005
Location: United States
Posts: 351
Thumbs down

Hi all,

I have improved Mashi's image-overlay plugin so that you can load images with world files (i.e. the georeferencing information). For example, when you try to load a JPG, it will look for a JFW file so that it can place the image correctly on the globe. It will do the same for GIF/GFW, PNG/PGW, and TIF/TFW.

All images MUST be in geographic projection (lat/long).

I have only tested it with smallish images, which seem to take a while, and keep in mind that there is no progress bar...so you'll just need to wait for the image to appear.

Sorry, I couldn't include an image sample, because of the file attachment size...

Remember that this and the original plugin save the images in a text file, and when you re-open worldwind, and load the plugin, all of your images are loaded automatically.

UPDATE (November 16/2005):

- IMAGES NOW DRAPE ON THE TERRAIN

UPDATE (November 17/2005):

- Corners re-draw at the correct height, when using vertical exaggeration

UPDATE (April 21/2006):

- The plugin does not seem to work properly with 1.3.4, I'll be looking at this issue soon.

<span style="color:red">FOR THE FUTURE:</span>

- The ability to save new images, after changing the position/size of the image (and write new world files).

- Incorporate Pierrick's code to move corner's independently (to re-shape/resize), Pierrick, can you do this?

- Adding support for .map world files

- Add support for header world file info, ala GEOTIFF

-Progress bar (can anyone help with this?)

Just unzip the attachment and run the exe, to install to your WorldWind directory (accept the default location in most cases).

Dan
Attached Files
File Type: zip Worldwind_1.3_ImageOverlay_1.1.zip (29.6 KB, 1159 views)
geodan is offline   Reply With Quote
Old 11-02-2005, 09:58 PM   #2
bull
Cosmic Overlord
 
bull's Avatar
 
Join Date: Oct 2004
Location: United Kingdom
Posts: 2,362
Default

Cool, now all it needs is a rotate option
__________________
Bull_[UK]

bull is offline   Reply With Quote
Old 11-03-2005, 05:34 PM   #3
geodan
World Wind Developer
 
geodan's Avatar
 
Join Date: Aug 2005
Location: United States
Posts: 351
Default

Does anyone have any idea how I can drape an image layer on the terrain?..similar to how the WMS images are draped...

thanks,
Dan
geodan is offline   Reply With Quote
Old 11-03-2005, 11:25 PM   #4
canosso
Senior Member
 
Join Date: Oct 2004
Location: Austria
Posts: 342
Default

Hello geodan,

Quote:
Originally posted by geodan@Nov 3 2005, 08:34 AM
Does anyone have any idea how I can drape an image layer on the terrain?..similar to how the WMS images are draped...

thanks,
Dan
If the image is geo-referenced, add an layer for the image in @Images.xml by copying a QuadTileSet. Maybe it is possible to call the <TerrainMapped>true</TerrainMapped> option with the plug-in, this should not be easy because the plug-in use only RenderableObjects list but the TerrainMapped option is only option of ImageLayer. Maybe Mashiharu could help.

canosso
__________________
My Plug-ins for World Wind
canosso is offline   Reply With Quote
Old 11-07-2005, 11:39 PM   #5
Killroy
Guest
 
Posts: n/a
Default

Quote:
Originally posted by geodan@Nov 2 2005, 11:59 AM
Hi all,

I have improved Mashi's image-overlay plugin so that you can load images with world files (i.e. the georeferencing information). For example, when you try to load a JPG, it will look for a JFW file so that it can place the image correctly on the globe. It will do the same for GIF/GFW, PNG/PGW, and TIF/TFW.

All images MUST be in geographic projection (lat/long).

I have only tested it with smallish images, which seem to take a while, and keep in mind that there is no progress bar...so you'll just need to wait for the image to appear.

Sorry, I couldn't include an image sample, because of the file attachment size...

Remember that this and the original plugin save the images in a text file, and when you re-open worldwind, and load the plugin, all of your images are loaded automatically.


FOR THE FUTURE:

-If anyone would like to help, it would be nice to have a progress bar
-and it would be nice to have the images DRAPE on the terrain

Just unzip the attachment and run the exe, to install to your WorldWind directory (accept the default location in most cases).

Dan
Hey Dan

Could you tell me if the .jfw file is like the .sdw file that is used in other apps. Also, I have some color photos that I have from the Pa site listed elsewhere on the forum. I had to convert them from the .sid format and I would like to get them into WW one way or another. I figure if I knew the format I could just hand code a small text doc into the correct file needed.
  Reply With Quote
Old 11-08-2005, 12:36 AM   #6
geodan
World Wind Developer
 
geodan's Avatar
 
Join Date: Aug 2005
Location: United States
Posts: 351
Default

Quote:
Originally posted by Killroy@Nov 7 2005, 06:39 PM
Hey Dan

Could you tell me if the .jfw file is like the .sdw file that is used in other apps. Also, I have some color photos that I have from the Pa site listed elsewhere on the forum. I had to convert them from the .sid format and I would like to get them into WW one way or another. I figure if I knew the format I could just hand code a small text doc into the correct file needed.
Hey...here is a sample of a jfw...

0.000434295612453671670
0.0
0.0
-0.000434295612453671670
-91.436634653313519
14.756679134064553


Dan
geodan is offline   Reply With Quote
Old 11-08-2005, 02:25 AM   #7
Killroy
Guest
 
Posts: n/a
Default

Quote:
Originally posted by geodan@Nov 7 2005, 03:36 PM
Hey...here is a sample of a jfw...

0.000434295612453671670
0.0
0.0
-0.000434295612453671670
-91.436634653313519
14.756679134064553
Dan
Hmmmm here is the text of a .sdw file.

1.000000000000000
0.000000000000000
0.000000000000000
-1.000000000000000
1690000.500000000000000
299999.50000000000000

As you can see it's not so different. I looked on the internet of how to interpret a jfw file but I never understood how the numbers fit with coordinates.
  Reply With Quote
Old 11-08-2005, 04:08 AM   #8
geodan
World Wind Developer
 
geodan's Avatar
 
Join Date: Aug 2005
Location: United States
Posts: 351
Default

Quote:
Originally posted by Killroy@Nov 7 2005, 09:25 PM
Hmmmm here is the text of a .sdw file.

1.000000000000000
0.000000000000000
0.000000000000000
-1.000000000000000
1690000.500000000000000
299999.50000000000000

As you can see it's not so different. I looked on the internet of how to interpret a jfw file but I never understood how the numbers fit with coordinates.
Well, your numbers suggest that your image has a 1 meter pixel resolution, and the bottom two values are the x,y coordinates for the top-left pixel in the image. As I say in the above posts...all images MUST be in a geographic projection (with a geographic world file), as that is all WorldWind supports.

Of course, if you didn't want to project the images...you could always pull up the map projection formula for whatever projection your images are in...and convert the coordinates into geographic...with some code (as an extension of the plugin).

For the meantime...if you want to get the images into WorldWind, re-project your images into geographic lat/long projection...and make sure they are gif/jpg/png/ or tif....

Dan
geodan is offline   Reply With Quote
Old 11-08-2005, 11:06 PM   #9
Guest
Guest
 
Posts: n/a
Default

Quote:
Originally posted by geodan@Nov 7 2005, 07:08 PM
Well, your numbers suggest that your image has a 1 meter pixel resolution, and the bottom two values are the x,y coordinates for the top-left pixel in the image. As I say in the above posts...all images MUST be in a geographic projection (with a geographic world file), as that is all WorldWind supports.

Of course, if you didn't want to project the images...you could always pull up the map projection formula for whatever projection your images are in...and convert the coordinates into geographic...with some code (as an extension of the plugin).

For the meantime...if you want to get the images into WorldWind, re-project your images into geographic lat/long projection...and make sure they are gif/jpg/png/ or tif....

Dan
Nice...haven't had a chance to look at the code yet but did they fix the little thingy in the source (see other thread) or did you have another work around?

I noticed that context menus seem to have gone away in 1.3.3.1 (at least mine did) until I put the older 1.3.3 code back into the if test somewhere. I recall that I based my context menu plugin code on Mashi's image overlay ones.

Regards,

Nigel
  Reply With Quote
Old 11-09-2005, 03:28 AM   #10
geodan
World Wind Developer
 
geodan's Avatar
 
Join Date: Aug 2005
Location: United States
Posts: 351
Default

Quote:
Originally posted by Guest@Nov 8 2005, 06:06 PM
Nice...haven't had a chance to look at the code yet but did they fix the little thingy in the source (see other thread) or did you have another work around?

I noticed that context menus seem to have gone away in 1.3.3.1 (at least mine did) until I put the older 1.3.3 code back into the if test somewhere. I recall that I based my context menu plugin code on Mashi's image overlay ones.

Regards,

Nigel
I have no idea what you are talking about...
geodan is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Favorites / Bookmarks plugin Dugrhill Add-ons & Scripts 21 02-27-2010 05:59 AM
stereo viewer plugin jumpjack Add-ons & Scripts 15 08-19-2005 09:48 PM


All times are GMT +1. The time now is 12:20 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.