This project is read-only.

Setting up GDAL Extensions

Jan 19, 2011 at 9:50 PM

Hi All,

I'm trying to add GDAL extensions to the DemoMap. 

I don't see GDAL in the AppManager->DataManager ImageRead/ImageWrite Filter properties therefore I'm trying to find out where I should configure the path to point to the GDALExtensions directory.

The app manager has a DataProviderDirectories property under AppManager->DataManager->DataProviderDirectories

The DataProviderDirectories has a value named "Collections"

When I try to add something to Collections I get an error that says "Constructor on type "System.String" not found.

The AppManager also has a property called Directories under AppManager->Directories

Directories has a value named "Collections".  When I click on "Collections" a pop-up appears with two values

0. Plugins

1.  Apps

I'm not sure if I need to add/change something here?

The other thing I tried was going to properties for the application and  adding in reference paths that point to the home directory of my dotspatial install as well as the GDAL directory under that install (didn't work though).

Anyone know how to define the path for GDAL Extensions for the DemoApp?

Thanks,

Alan

Jan 20, 2011 at 5:20 AM

Alan,

It's good forum etiquette to try and keep your posts on the same topic to one thread thread. Posting the same question multiple times may incurr the wrath of the forum moderator :). You are already discussing this problem here. In fact there are already a few threads on GDALDataExtension issues like this one but I take it that you have searched the forums for a solution already and didn't find the answer you were looking for. It may help you to get a response if you post your question on an exsisting thread on the same topic.

I have posted to your original thread so check my reply there.
Ted - Do we need a forum usage guide?
Jan 20, 2011 at 4:10 PM

Mathew was asking what we could do to improve things forum wise, and I think the best thing we could do is have some kind of FAQ page or table of contents.  The search is already useful if you can think of some good keywords to look for content on your topic, but it doesn't do a great job of organizing what we have already been addressed, or picking out content that is asked repeatedly.  People more or less just post the same question over and over again, mostly about getting GDAL to work.  But it occurred to me that people might have a better time figuring out where to look if we had some kind of hierarchical table of contents that they could look at at a glance that showed categories, which could be progressively narrowed down until they find something that will help them.  This is maybe an ambitious undertaking, however, and maybe it would be better for Mathew to spend his time fixing the actual bugs.  We could append any forum etiquette to this FAQ page.

Ted

Jan 20, 2011 at 4:31 PM

Hi,

I'd like to offer my perspective as a relative new-comer to the discussion forum.

The ability to create "new" topics lends itself to creating repeatable topics since for example one user may not know that a similar topic was created x number of months ago by another user.

This in turn gives the functionality of creating new topics a sort of email like feel.

IMHO, if the number of top level topics were broken down into high level categories based on functionality than postings with redundant titles would seem less of a hindrance and more of a metric of functional complexity.

Thanks,

Alan

 

Jan 20, 2011 at 4:54 PM

Yes, if it seems like e-mail that's because I get it in my in-box =).  I agree that finding an answer by sifting through potentially thousands of miscellaneous e-mails doesn't seem very efficient.  We are limited in what we can do to the actual forum format itself, seeing as this is hosted by Codeplex.  However, I think we could set up a linkage page with categories like you are describing as part of the organization of the FAQ page.  Not too too ambitious mind you, but at least for the most frequent questions that come up.  I think there is still some benefit to people being able to post their exact question on the forum without worrying too much about whether or not it has been posted before.  As the number of users increases to the point where one person can't possibly answer all the questions, hopefully other members of the community start pitching in at that point.  If the community is large enough it might be more capable at pointing out an existing topic since the question asker might not know where to look for the answer.

Ted

 

Jan 20, 2011 at 5:24 PM

At a minimum we should have a well linked and documented GDAL page...

- Dan
--------
Daniel P. Ames Ph.D.
Idaho State University Dept. of Gesciences
dan.ames@isu.edu
--------
Sent from my Droid

On Jan 20, 2011 9:55 AM, "shade1974" <notifications@codeplex.com> wrote:
> From: shade1974
>
> Yes, if it seems like e-mail that's because I get it in my in-box =). I agree that finding an answer by sifting through potentially thousands of miscellaneous e-mails doesn't seem very efficient. We are limited in what we can do to the actual forum format itself, seeing as this is hosted by Codeplex. However, I think we could set up a linkage page with categories like you are describing as part of the organization of the FAQ page. Not too too ambitious mind you, but at least for the most frequent questions that come up. I think there is still some benefit to people being able to post their exact question on the forum without worrying too much about whether or not it has been posted before. As the number of users increases to the point where one person can't possibly answer all the questions, hopefully other members of the community start pitching in at that point. If the community is large enough it might be more capable at pointing out an existing topic since the question asker might not know where to look for the answer.Ted
>
>
Jan 20, 2011 at 6:39 PM

I downloaded change set 6f492d0f0a18, compiled as x86 and ran the demo map.  GDAL appeared when I hit the add layer button and I was able to open a tiff, jpeg and bmp image.

The link to all GDAL supported data formats can be found at http://www.gdal.org/frmt_various.html

One of the supported formats is CADRG that has a table of contents file called "a.toc".

I tried opening an "a.toc" file and I received a message that "the specified data type is not supported".

Would you know if this is a GDAL version issue or a DotSpatial one?

Thanks,

Alan

Jan 20, 2011 at 6:59 PM

It may just need to be added to the supported extension list for GDAL.  Is this an image format or a grid format?

Ted

 

Jan 20, 2011 at 8:45 PM

Hi Ted, I believe it is an image format.

Is it difficult to add it as a supported extension for GDAL?

Thanks,

Alan

Jan 20, 2011 at 9:02 PM

No, not at all, we just basically need to add ".toc" to the filter expression.  But that only works if GDAL itself supports the format.  If GDAL doesn't like it then adding the text to the filter expression will only produce an unsupported file format exception from deeper in the code ;).

I will see if I can add the extension to the GDAL Image provider, and you can see if it works.

Ted

 

Jan 20, 2011 at 9:15 PM

Great! Sounds good.

 

Thanks,

Alan

Jan 20, 2011 at 9:39 PM

Change set a782883ecff6 added the toc extension on Jan 20.  I have no idea if this will work at all though, with regards to GDAL as I don't have any test data.  But it will let you take it one step further and see if GDAL breaks on it.

Ted

Jan 20, 2011 at 9:58 PM

Hi Ted, I tried it.  I received a message that states "object reference not set to an instance of an object".

I'm not sure if this is GDAL or DotSpatial returning the error or how to fix it.  I'm searching online for some GDAL info on RPF files.

Thanks,

Alan

Jan 21, 2011 at 11:00 AM

Re: Forum usage - You hit the nail on the head Alan, I think the idea with CodePlex is to use tags and the Topic View do you think that would do the job guys? Oops, now I'm off topic ;)

I'm happy to try a CADRG  .toc file with the vanilla GDAL 1.7 and our managed GDALDataExtension if you would like Alan - can you provide or point me at a source for one? (OK with you Ted?)


Jan 21, 2011 at 4:11 PM

Of course Ben, this seems like something that is right up your alley.

Ted

 

Jan 25, 2011 at 2:02 PM

Hi Ben, I'll try to find a redistributable sample of CADRG data.

Once I get something where should I post it?

Thanks,

Alan

 

Jan 26, 2011 at 3:45 AM

Umm not to sure. Any ideas Ted?

Jan 26, 2011 at 4:07 PM

It depends on how large it is.  If it is small, you can post in connection with an issue, which allows you to post data associated with your issue.  Alternately, if it is huge, but available online somewhere, you can post a link either here or in an issue.  Let me know if none of these are an option.

Ted

Jan 27, 2011 at 5:44 PM

Hi Ben/Ted, I did some research.  Seems as if OGDI is involved in using a.toc.

A link to the OGDI test suite can be found here. 

http://sourceforge.net/projects/ogdi/files/OGDI_Test_Suite/3.1/

There is an  a.toc file and associated data in the download.

Any idea if DotSpatial has OGDI support?  If not, how could I go about recommending support for OGDI in DotSpatial?

Thanks,

Alan

 

Jan 27, 2011 at 6:05 PM

If we need to include more files, there are two options.  If you are not setup as a developer yet, you can request to be one, and we can let you take a shot at getting something set up yourself and then committing it to the repository.  Alternately, you can post enough information about what would need to be done so that someone on our team can take care of it for you, and add it to the Issues report as a feature request.  Actually, I'm not sure if you can control whether or not it is a feature request unless you are logged in, but basically if it is in the issues list, it is less likely to get lost.  It may not happen overnight, however.  There are a long list of features and upgrades and bugs and improvements with regards to DotSpatial, but at least it will be on the list at that point.  Discussions are more for serving as an immediate e-mail correspondence and as a searchable help set for previously answered questions, but feature requests would be rapidly lost or forgotten about here.

Ted

 

Jan 31, 2011 at 9:14 PM

I added a new data type to GDALImageProvider called ".lf2"

 

.lf2 files are tiled images.

 

I can load the .lf2 files using the toolstripbar.

 

I'd like to load some ".lf2" upon entry into the application.

 

Any idea how I can do that?

 

Thanks much!

-Alan

Jan 31, 2011 at 10:08 PM

Are you writing your own app using the components as controls?  If so, you can just handle the form loading event, or whatever.  If you are writing a plug-in, then it's harder because by the time your plug-in is initialized, there is a very good chance the application is already started and the map already exists.  So you won't be able to catch application events like that in the startup.  What you can do is capture the ViewExtentsChanged event on the map.  That way, once someone starts zooming and panning around, you can load the appropriate tiles, or ensure your layer is loaded.  I believe that Mathew was creating a way for you to specify that your plug-in would load at the startup, but I'm not sure if that is finished or how it works if it is finished.  But presuming you can do that now, then you can just set your plugin to turn on at startup and then handle turning on the layer in the initialize event from your plug-in.  This may require adding your plug-in to a special group like Application Plug-ins or something, I'm not sure.  It may be a different directory, and is an extremely new addition, so you would have to be building from source, not the existing binaries.

Ted

 

Feb 1, 2011 at 9:02 PM
Alan, I like the idea of pre-loaded tiles. Can you tell us how you're doing this and if it works out for you? - Dan

On Mon, Jan 31, 2011 at 3:08 PM, shade1974 <notifications@codeplex.com> wrote:

From: shade1974

Are you writing your own app using the components as controls? If so, you can just handle the form loading event, or whatever. If you are writing a plug-in, then it's harder because by the time your plug-in is initialized, there is a very good chance the application is already started and the map already exists. So you won't be able to catch application events like that in the startup. What you can do is capture the ViewExtentsChanged event on the map. That way, once someone starts zooming and panning around, you can load the appropriate tiles, or ensure your layer is loaded. I believe that Mathew was creating a way for you to specify that your plug-in would load at the startup, but I'm not sure if that is finished or how it works if it is finished. But presuming you can do that now, then you can just set your plugin to turn on at startup and then handle turning on the layer in the initialize event from your plug-in. This may require adding your plug-in to a special group like Application Plug-ins or something, I'm not sure. It may be a different directory, and is an extremely new addition, so you would have to be building from source, not the existing binaries.

Ted

Read the full discussion online.

To add a post to this discussion, reply to this email (DotSpatial@discussions.codeplex.com)

To start a new discussion for this project, email DotSpatial@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
Daniel P. Ames, Ph.D. PE
Associate Professor, Geosciences
Idaho State University - Idaho Falls
amesdani@isu.edu
geology.isu.edu
www.mapwindow.org


Feb 2, 2011 at 3:24 PM

Hi Dan, I plan on loading tiles into the cache based on the direction of track movement.  Its nothing fancy but I'd be happy to share the code when I'm done.

-Alan

Feb 3, 2011 at 9:11 PM
Thanks. I'm sure others would appreciate it. - Dan

On Wed, Feb 2, 2011 at 8:24 AM, aleberkn <notifications@codeplex.com> wrote:

From: aleberkn

Hi Dan, I plan on loading tiles into the cache based on the direction of track movement. Its nothing fancy but I'd be happy to share the code when I'm done.

-Alan

Read the full discussion online.

To add a post to this discussion, reply to this email (DotSpatial@discussions.codeplex.com)

To start a new discussion for this project, email DotSpatial@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe or change your settings on codePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at codeplex.com




--
Daniel P. Ames, Ph.D. PE
Associate Professor, Geosciences
Idaho State University - Idaho Falls
amesdani@isu.edu
geology.isu.edu
www.mapwindow.org