Open Source Solutions that handle MGRS

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|

Open Source Solutions that handle MGRS

Sampson, David
Open Source Solutions that handle MGRS

Hey Folks,

I'm working with a local Search and rescue group as they naviagte the world of mapping software.

I am wondering if anyone has any knowledge or experience with using MGRS (Millitary Grid Reference System) in open source packages.

I looked at both PROJ and the EPSG code listing and could not find MGRS. IS it there buried in something else?

The discussion lists had something about adding MGRS to PROJ but found nothing recent to confirm the addition of the feature.

Cheers


_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
Reply | Threaded
Open this post in threaded view
|

Re: Open Source Solutions that handle MGRS

Frank Warmerdam
Sampson, David wrote:

> Hey Folks,
>
> I'm working with a local Search and rescue group as they naviagte the
> world of mapping software.
>
> I am wondering if anyone has any knowledge or experience with using MGRS
> (Millitary Grid Reference System) in open source packages.
>
> I looked at both PROJ and the EPSG code listing and could not find MGRS.
> IS it there buried in something else?
>
> The discussion lists had something about adding MGRS to PROJ but found
> nothing recent to confirm the addition of the feature.

Dave,

MGRS is a bit hard for most projection engines to handle since it doesn't
treat locations as a coordinate tuple, but as a single value (essentially
x/y digits interleaved).

There is C code for converting MGRS coordinates into something more usable
in the GDAL NITF driver.

   http://trac.osgeo.org/gdal/browser/trunk/gdal/frmts/nitf/mgrs.c
   http://trac.osgeo.org/gdal/browser/trunk/gdal/frmts/nitf/mgrs.h

This code was (I think) derived from geotrans or perhaps nima muse.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
Reply | Threaded
Open this post in threaded view
|

RE: Open Source Solutions that handle MGRS

Sampson, David
Hmmm,

I think the key for this use of MGRS is the ability to communicate with
other searching authorities like police and military. Apparently many
SAR teams are moving over to MGRS for use in the field.

Can the code below be used using any of the command line tools? Or are
they stand alone snipets?  Could a python script exploit the snippets
for use in a plugin or something?

Cheers

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Frank
Warmerdam
Sent: Wednesday, January 09, 2008 22:08
To: Ottawa (Canada) Local Chapter List
Subject: Re: [Ottawa_users] Open Source Solutions that handle MGRS

Sampson, David wrote:
> Hey Folks,
>
> I'm working with a local Search and rescue group as they naviagte the
> world of mapping software.
>
> I am wondering if anyone has any knowledge or experience with using
> MGRS (Millitary Grid Reference System) in open source packages.
>
> I looked at both PROJ and the EPSG code listing and could not find
MGRS.
> IS it there buried in something else?
>
> The discussion lists had something about adding MGRS to PROJ but found

> nothing recent to confirm the addition of the feature.

Dave,

MGRS is a bit hard for most projection engines to handle since it
doesn't treat locations as a coordinate tuple, but as a single value
(essentially x/y digits interleaved).

There is C code for converting MGRS coordinates into something more
usable in the GDAL NITF driver.

   http://trac.osgeo.org/gdal/browser/trunk/gdal/frmts/nitf/mgrs.c
   http://trac.osgeo.org/gdal/browser/trunk/gdal/frmts/nitf/mgrs.h

This code was (I think) derived from geotrans or perhaps nima muse.

Best regards,
--
---------------------------------------+--------------------------------
---------------------------------------+------
I set the clouds in motion - turn up   | Frank Warmerdam,
[hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo,
http://osgeo.org

_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
Reply | Threaded
Open this post in threaded view
|

Re: Open Source Solutions that handle MGRS

Frank Warmerdam
Sampson, David wrote:
> Hmmm,
>
> I think the key for this use of MGRS is the ability to communicate with
> other searching authorities like police and military. Apparently many
> SAR teams are moving over to MGRS for use in the field.
>
> Can the code below be used using any of the command line tools? Or are
> they stand alone snipets?  Could a python script exploit the snippets
> for use in a plugin or something?

Dave,

None of the existing PROJ.4 or GDAL coordinate transformation utilities
and APIs support MGRS - as I mentioned before - because it isn't a
coordinate tuple.

You could either write a custom MGRS oriented commandline utility calling
into the existing code or recast the operations in mgrs into python and
write a python utility.

Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, [hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo, http://osgeo.org

_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
Reply | Threaded
Open this post in threaded view
|

RE: Open Source Solutions that handle MGRS

Sampson, David
Thanks

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Frank
Warmerdam
Sent: Thursday, January 10, 2008 11:50
To: Ottawa (Canada) Local Chapter List
Subject: Re: [Ottawa_users] Open Source Solutions that handle MGRS

Sampson, David wrote:
> Hmmm,
>
> I think the key for this use of MGRS is the ability to communicate
> with other searching authorities like police and military. Apparently
> many SAR teams are moving over to MGRS for use in the field.
>
> Can the code below be used using any of the command line tools? Or are

> they stand alone snipets?  Could a python script exploit the snippets
> for use in a plugin or something?

Dave,

None of the existing PROJ.4 or GDAL coordinate transformation utilities
and APIs support MGRS - as I mentioned before - because it isn't a
coordinate tuple.

You could either write a custom MGRS oriented commandline utility
calling into the existing code or recast the operations in mgrs into
python and write a python utility.

Best regards,
--
---------------------------------------+--------------------------------
---------------------------------------+------
I set the clouds in motion - turn up   | Frank Warmerdam,
[hidden email]
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGeo,
http://osgeo.org

_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
Reply | Threaded
Open this post in threaded view
|

New Brunswick User looking for help with GRASS and Quantum GIS

Alyre Chiasson
In reply to this post by Frank Warmerdam
Hello all,

I have been subscribed to the list for a while but haven't seen too many
questions actually concerning use of GRASS and Quantum GIS. I am new to
GIS and an aquatic biologist that has convinced himself that I could get
a handle on these two programs to look at the effects of climate change
on freshwater fish distribution in New Brunswick. I don't need help with
installation and have managed to do some basic operations, have tried to
do my homework but have a number of fundamental questions that are still
alluding me that I would like to get past. Before taking up your time is
it appropriate to post such questions to this users group or is there
perhaps a more appropriate forum?

Thanks

Alyre Chiasson
_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
Reply | Threaded
Open this post in threaded view
|

RE: New Brunswick User looking for help with GRASS andQuantum GIS

Sampson, David
My 2 cents,

It depends on what the question is. My feeling would be to post the
question and if it's the right place then it will get answered, if not
then I'm sure that someone will redirect you.

We had a GRASS workshop last meeting, perhaps you attended. I am not
sure if they got to using QGIS as the front end.

If you're looking for people in the region that can help with some
specifics there are at least 3 of us on this list that are avid GRASS
users, so you certainly have some resources at hand. Especialy if you
want to meet with some grass users over beer and a laptop to try out
some stuff.

If the question is more specific on the abilities and functions of GRASS
or QGIS then the matching mailing lists are great places to also post.
And funny enough at least 2 of us monitor the GRASS list either
regularly or occasionaly.

I have experience using another application called JUMP for use in a
Littoral study that was conducted in the region. Essentialy JUMP was
used for the digitization of field notes for various themes of the
littoral study, similar approach could be done in GRASS, or results
imported to GRASS, or heck just use POSTGIS in the back and access the
data from any FOSS4G source.

I have used GRASS however to construct bathymetric maps.

So fire away and see what response you get.


Resources:
Have you gone through some or all of these tutorials?
http://grass.itc.it/gdp/tutorials.php

Check out the special topics too, you might find something related
http://grass.itc.it/gdp/special.php


Cheers



-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Alyre
Chiasson
Sent: Wednesday, January 16, 2008 07:46
To: Ottawa (Canada) Local Chapter List
Subject: [Ottawa_users] New Brunswick User looking for help with GRASS
andQuantum GIS

Hello all,

I have been subscribed to the list for a while but haven't seen too many
questions actually concerning use of GRASS and Quantum GIS. I am new to
GIS and an aquatic biologist that has convinced himself that I could get
a handle on these two programs to look at the effects of climate change
on freshwater fish distribution in New Brunswick. I don't need help with
installation and have managed to do some basic operations, have tried to
do my homework but have a number of fundamental questions that are still
alluding me that I would like to get past. Before taking up your time is
it appropriate to post such questions to this users group or is there
perhaps a more appropriate forum?

Thanks

Alyre Chiasson
_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
Reply | Threaded
Open this post in threaded view
|

Re: New Brunswick User looking for help with GRASS and Quantum GIS

Scott Mitchell-3
In reply to this post by Alyre Chiasson
I'd say go ahead.  I actually ran a workshop on using the two  
packages together here in December, and may know the answers to your  
question off the top of my head.  And since others may be interested,  
by all means use the list.

Cheers,
Scott

On 16-Jan-08, at 07:45 , Alyre Chiasson wrote:

> Hello all,
>
> I have been subscribed to the list for a while but haven't seen too  
> many questions actually concerning use of GRASS and Quantum GIS. I  
> am new to GIS and an aquatic biologist that has convinced himself  
> that I could get a handle on these two programs to look at the  
> effects of climate change on freshwater fish distribution in New  
> Brunswick. I don't need help with installation and have managed to  
> do some basic operations, have tried to do my homework but have a  
> number of fundamental questions that are still alluding me that I  
> would like to get past. Before taking up your time is it  
> appropriate to post such questions to this users group or is there  
> perhaps a more appropriate forum?
>
> Thanks
>
> Alyre Chiasson
> _______________________________________________
> Ottawa_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/ottawa_users

_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
Reply | Threaded
Open this post in threaded view
|

Re: New Brunswick User looking for help with GRASS and Quantum GIS

peter-301
On Wednesday 16 January 2008 1:05 pm, Scott Mitchell wrote:
> I'd say go ahead.  I actually ran a workshop on using the two
> packages together here in December, and may know the answers to your
> question off the top of my head.  And since others may be interested,
> by all means use the list.

Also, if you're interested there is a qgis list that is quite active at
http://qgis.org/index.php?option=com_content&task=view&id=115&Itemid=96

--
Peter Pankonin, digitalcrucible

There are 10 kinds of people in the world,
those who understand binary, and those who don't.
_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
Reply | Threaded
Open this post in threaded view
|

RE: New Brunswick User looking for help with GRASS andQuantum GIS

Sampson, David
In reply to this post by Scott Mitchell-3
The workshop is available on the wiki, I failed to notice you're writing
from New Brunswick.

Check it out here http://cemml.carleton.ca/osgeo_files/tutdoc.pdf

Cheers

-----Original Message-----
From: [hidden email]
[mailto:[hidden email]] On Behalf Of Scott
Mitchell
Sent: Wednesday, January 16, 2008 08:05
To: Ottawa (Canada) Local Chapter List
Subject: Re: [Ottawa_users] New Brunswick User looking for help with
GRASS andQuantum GIS

I'd say go ahead.  I actually ran a workshop on using the two packages
together here in December, and may know the answers to your question off
the top of my head.  And since others may be interested, by all means
use the list.

Cheers,
Scott

On 16-Jan-08, at 07:45 , Alyre Chiasson wrote:

> Hello all,
>
> I have been subscribed to the list for a while but haven't seen too
> many questions actually concerning use of GRASS and Quantum GIS. I am
> new to GIS and an aquatic biologist that has convinced himself that I
> could get a handle on these two programs to look at the effects of
> climate change on freshwater fish distribution in New Brunswick. I
> don't need help with installation and have managed to do some basic
> operations, have tried to do my homework but have a number of
> fundamental questions that are still alluding me that I would like to
> get past. Before taking up your time is it appropriate to post such
> questions to this users group or is there perhaps a more appropriate
> forum?
>
> Thanks
>
> Alyre Chiasson
> _______________________________________________
> Ottawa_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/ottawa_users

_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
Reply | Threaded
Open this post in threaded view
|

Re: New Brunswick User looking for help with GRASS and Quantum GIS - may be of interest to new users

Alyre Chiasson
Hello all,

Thanks for all the offers of help and the suggestion to do an initial
post. Perhaps a quick explanation of what I am attempting to do would be
in order as well as what resources I have on hand. I have the book,
“Open Source GIS: A GRASS GIS Approach” by Netler and Mitasova (second
edition, and I just got the third yesterday) and have printed out an
“Introduction to the practical use of the Free Geographical Information
System GRASS 6.0,” so you can point me to specific pages that might be
of help that I may have overlooked.

I have a bunch of shape files from Environment Canada with predicted
maximum air temperature increases for New Brunswick (they are actually
of the whole Atlantic Region from what I can see) in 30 year blocks to
2100 (Dataset A). They do have “prj” files. Example:

GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]

They come up as isotherms (contour lines) and are labeled; the labels
are in a dbf file.

I also have shapefiles for the rivers and streams in New Brunswick,
including (site/point) data with watercourse names (Dataset B). They
also have “prj” files. They also include basic boundaries to the
province. Again, here is the prj file.


GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]

I also have data on mean maximum water temperatures for various rivers
across New Brunswick (Dataset C). They are current in an Excel
spreadsheet and have the following format:


CoordinateSystem XCoordinate YCoordinate CoordinateUnits
NAD83 (CSRS) NB Stereographic 2394846.697 7657396.666 Meters


I also have upper lethal temperature data for most of the freshwater
fish of New Brunswick. You can get predicted water temperatures by
multiplying air temperature by 0.9 and adding it to the base water
temperature. The idea would be for each site where baseline water
temperatures are known, the nearest isotherm would be chosen and the
predicted increase for that site calculated and labeled. I was also
hoping to be able to superimpose on this a layer that would flag
temperatures above a certain value. For example, if it happened to be
Atlantic salmon, there would be a red dot above 24 C. Increasing red
dots over time would means progressive loss of the species (main point
of the exercise).

I also bought a copy of NBGEOCALC from Services New Brunswick, which
they describe as:

NBGeocalc is a piece of software designed by SNB to help with coordinate
conversions and transformations in New Brunswick. It is the accepted
standard for transforming coordinates from/to ATS77 and NAD83 (CSRS). It
is also a very useful tool to convert in all directions, latitudes /
longitudes and UTM coordinates

I figure I might get some water temperature data from sports clubs but
in lat and long.

 From the provincial web site I found that the province uses something
called NAD83 (CSRS) Double Sterographic, a screen capture of parameters
is attached (image2). I have also found that this corresponds to EPSG
code 2953. Out of this I see two options:

1) Stick with NAD83 of datasets A and B and use GEOCALC to translate the
coordinates of dataset 3. Other than being compatible with the province
and I don’t know what the advantage of Double Stereographic is and maybe
it does not make a difference for what I want to do.

2) The other option is to covert dataset A and B (shapefiles) and
creates a LOCATION and mapset based on a Double Stereographic
Projection. I have created a LOCATION using EPSG code 2953 and get the
following output from g.proj.

PROJCS["Stereographic",
GEOGCS["unnamed",
DATUM["unknown",
SPHEROID["unnamed",6378137,298.257222101]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Oblique_Stereographic"],
PARAMETER["latitude_of_origin",46.5],
PARAMETER["central_meridian",-66.5],
PARAMETER["scale_factor",0.999912],
PARAMETER["false_easting",2500000],
PARAMETER["false_northing",7500000],
UNIT["metre",1]]

My first concerns are the “unkown”s and the second is that the
projection is listed as “Oblique Sterographic” and not “Double”. Maybe
“Oblique” is actually a “Stero” projection? Somewhat disconcerting for
someone starting out. I confirmed the EPSG code from:
http://spatialreference.org/ref/epsg/2953/

I am also confused as to what kind of coordinate system is being used
above (Double Sterographic). Seems like a form of UTM? As a question, if
I was to create the LOCATION from scratch based on UTM, how would I go
about representing New Bruswick as a LOCATION that actually physically
lies within 2 UTM zones? All of the examples that create LOCATIONs based
on UTM that I have seen so far are silent on what you do if your
LOCATION covers more than one zone. Can you actually query across two
LOCATIONs, is that the solution? So what are “Sterographic” coordinates,
does everything become the equivalent of a single zone and the
projection corrects for errors involved in extrapolating for what would
be otherwise traversing from one zone to another?

Assuming that everything above is okay I grasp that I need to reproject
the shape files and convert the coordinate system. By example, I have a
shape file called nbmjwatr.shp and its associated prj file (first
example above). From what I have read so far the conversion can be done
with org2org. I am not sure what the command would be, I can’t find an
example where the particular prj files is specified or is it
automatically read if it is in the same directory? So would the command be

org2org nbmjwatr.shp \ -spat -60.05 35.00 -63.78 48.07 \ my_nbmjwatr.shp

?

The –spat is to cut out the boundaries to fit my the EPSG 2953 specified
boundaries.

I have tried something similar and got a string of errors saying I
needed to provide the transformation information. I may just have the
wrong command. If I extract this from the top prj file above, would the
following do the job

org2org -a_srs ‘+proj=latlong +ellps= GRS80 +datumn=NAD83’ \ -spat
-60.05 35.00 -63.78 48.07 \ my_nbmjwatr.shp nbmjwatr.shp

?

I assume the dbf file gets imported as well. What happens to the labels
which are in the dbf file? In the original shapefiles from Environment
Canada the labels are missing from the upper part of New Brunswick
because in the original they are over Nova Scotia (image1). Will the
labels be readjusted when the original file gets clipped? I can’t fine
anything on how label placement is determined. However, the first hurdle
is getting the basic maps into GRASS because I don’t think Quantum can
do the above.

I don’t know if GRASS can do the nearest neighbour isotherm type of
calculation I have proposed above with some king of script but I will be
doing more reading or you can suggest where I might look. Unless Quantum
would be an easier tool to do the above, I wanted to use it mainly as a
viewer for the resulting product.

I may be well over my head here but part of this was to see how
difficult the whole business would be. The Open Source approach was in
part because of my involvement with watershed groups that can’t afford
commercial GIS software but could profit from using GIS to look at their
data. My best course of action may be to hire someone to actually get
the work done first (priority) and I try to duplicate it with GRASS or
Quantum on my part. I get blank stares here when I mention either GRASS
or Quantum or anything Linux so it would be alternative GIS software if
I was to hire someone.

Just as background I am a biology professor of 20 years in a relatively
small university (Université de Moncton), in New Brunswick. So I guess I
am somewhat of an old dog trying to learn new things. The Apple IIe came
out when I was doing my doctorate :) and I actually cut my first teeth
on a Unix system so command lines don't bother me.

Thanks in advance for any suggestions/advice or help you care to offer.
If this is not of general interest I can carry on by email with anyone
that might want to help a somewhat lost soul. I guess, I am a good
example of someone coming from outside of the specific field of GIS.

Thanks

Alyre


_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users

Image1.bmp (3M) Download Attachment
Image2.bmp (892K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: New Brunswick User looking for help with GRASSand Quantum GIS - may be of interest to new users

Sampson, David
I'll try to hit a few points. I don't have all the answers to your questions, but they will certainly come in time.

I am a strong supporter of getting people into the GIS game without the overhead costs of licensing. Lots of groups out there to help. I am currently working with a local Search and Rescue Group to try and help them out. Interesting challenges.

The first part it sounds like you're trying to do is get your location set up. You have tripped across the most common barrier when exchanging data files from disparate sources. They are either in conflicting projections or datums.

Good on yhea for finding ogr2ogr. The OGR mailing list has helped me out with a lot of challenges and maybe a few folks here might have something to say. I do encourage the OGR mailing list, they are quite helpful. It looks like you have the general idea and assume you've looked at the syntax. Errors are good if you know what they mean. Try googling results of the errors against the mailing list archieves or the internet in general. Copy past of errors often turn up little gems. One way to think of it is that in most cases someone has experienced the same thing and it is already documented.

There is another approach you could try. Import like datasets into like locations. Then use the reproject function to reproject datasets in one location to a matching location. http://download.osgeo.org/grass/grass63/manuals/html63_user/v.proj.html  for the GUI try looking under the vector functions.  This might be easier to figure out that ogr2ogr if the command line gives you trouble.  Also you should be able to see the command is created under GRASS that might help future command line use using ogr2ogr.

For neighbour analysis check out
http://download.osgeo.org/grass/grass63/manuals/html63_user/v.neighbors.html
http://download.osgeo.org/grass/grass63/manuals/html63_user/r.neighbors.html


When you import SHP files using the OGR tool the DBF also gets imported
http://download.osgeo.org/grass/grass63/manuals/html63_user/v.in.ogr.html

If you just have a DBF file or DB connections with spatial info you want to bring into GRASS then check this out
http://download.osgeo.org/grass/grass63/manuals/html63_user/v.in.db.html

If you want to import attribute Database info check out
http://download.osgeo.org/grass/grass63/manuals/html63_user/db.in.ogr.html

Not that this is part of your challenge but something I just learned researching your query is that GRASS (through OGR) now supports import and export of KML. Now you can share results in google earth and google maps. (just an aside)
http://download.osgeo.org/grass/grass63/manuals/html63_user/v.out.ogr.html
http://www.gdal.org/ogr/drv_kml.html


Remember, when in doubt the manual is your friend. I like the onlione version because it is searchable
http://download.osgeo.org/grass/grass63/manuals/html63_user/index.html

I hope some of these help...

Cheers




-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Alyre Chiasson
Sent: Tuesday, January 22, 2008 16:48
To: Ottawa (Canada) Local Chapter List
Subject: Re: [Ottawa_users] New Brunswick User looking for help with GRASSand Quantum GIS - may be of interest to new users

Hello all,

Thanks for all the offers of help and the suggestion to do an initial post. Perhaps a quick explanation of what I am attempting to do would be in order as well as what resources I have on hand. I have the book, "Open Source GIS: A GRASS GIS Approach" by Netler and Mitasova (second edition, and I just got the third yesterday) and have printed out an "Introduction to the practical use of the Free Geographical Information System GRASS 6.0," so you can point me to specific pages that might be of help that I may have overlooked.

I have a bunch of shape files from Environment Canada with predicted maximum air temperature increases for New Brunswick (they are actually of the whole Atlantic Region from what I can see) in 30 year blocks to 2100 (Dataset A). They do have "prj" files. Example:

GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]

They come up as isotherms (contour lines) and are labeled; the labels are in a dbf file.

I also have shapefiles for the rivers and streams in New Brunswick, including (site/point) data with watercourse names (Dataset B). They also have "prj" files. They also include basic boundaries to the province. Again, here is the prj file.


GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]]

I also have data on mean maximum water temperatures for various rivers across New Brunswick (Dataset C). They are current in an Excel spreadsheet and have the following format:


CoordinateSystem XCoordinate YCoordinate CoordinateUnits
NAD83 (CSRS) NB Stereographic 2394846.697 7657396.666 Meters


I also have upper lethal temperature data for most of the freshwater fish of New Brunswick. You can get predicted water temperatures by multiplying air temperature by 0.9 and adding it to the base water temperature. The idea would be for each site where baseline water temperatures are known, the nearest isotherm would be chosen and the predicted increase for that site calculated and labeled. I was also hoping to be able to superimpose on this a layer that would flag temperatures above a certain value. For example, if it happened to be Atlantic salmon, there would be a red dot above 24 C. Increasing red dots over time would means progressive loss of the species (main point of the exercise).

I also bought a copy of NBGEOCALC from Services New Brunswick, which they describe as:

NBGeocalc is a piece of software designed by SNB to help with coordinate conversions and transformations in New Brunswick. It is the accepted standard for transforming coordinates from/to ATS77 and NAD83 (CSRS). It is also a very useful tool to convert in all directions, latitudes / longitudes and UTM coordinates

I figure I might get some water temperature data from sports clubs but in lat and long.

 From the provincial web site I found that the province uses something called NAD83 (CSRS) Double Sterographic, a screen capture of parameters is attached (image2). I have also found that this corresponds to EPSG code 2953. Out of this I see two options:

1) Stick with NAD83 of datasets A and B and use GEOCALC to translate the coordinates of dataset 3. Other than being compatible with the province and I don't know what the advantage of Double Stereographic is and maybe it does not make a difference for what I want to do.

2) The other option is to covert dataset A and B (shapefiles) and creates a LOCATION and mapset based on a Double Stereographic Projection. I have created a LOCATION using EPSG code 2953 and get the following output from g.proj.

PROJCS["Stereographic",
GEOGCS["unnamed",
DATUM["unknown",
SPHEROID["unnamed",6378137,298.257222101]],
PRIMEM["Greenwich",0],
UNIT["degree",0.0174532925199433]],
PROJECTION["Oblique_Stereographic"],
PARAMETER["latitude_of_origin",46.5],
PARAMETER["central_meridian",-66.5],
PARAMETER["scale_factor",0.999912],
PARAMETER["false_easting",2500000],
PARAMETER["false_northing",7500000],
UNIT["metre",1]]

My first concerns are the "unkown"s and the second is that the projection is listed as "Oblique Sterographic" and not "Double". Maybe "Oblique" is actually a "Stero" projection? Somewhat disconcerting for someone starting out. I confirmed the EPSG code from:
http://spatialreference.org/ref/epsg/2953/

I am also confused as to what kind of coordinate system is being used above (Double Sterographic). Seems like a form of UTM? As a question, if I was to create the LOCATION from scratch based on UTM, how would I go about representing New Bruswick as a LOCATION that actually physically lies within 2 UTM zones? All of the examples that create LOCATIONs based on UTM that I have seen so far are silent on what you do if your LOCATION covers more than one zone. Can you actually query across two LOCATIONs, is that the solution? So what are "Sterographic" coordinates, does everything become the equivalent of a single zone and the projection corrects for errors involved in extrapolating for what would be otherwise traversing from one zone to another?

Assuming that everything above is okay I grasp that I need to reproject the shape files and convert the coordinate system. By example, I have a shape file called nbmjwatr.shp and its associated prj file (first example above). From what I have read so far the conversion can be done with org2org. I am not sure what the command would be, I can't find an example where the particular prj files is specified or is it automatically read if it is in the same directory? So would the command be

org2org nbmjwatr.shp \ -spat -60.05 35.00 -63.78 48.07 \ my_nbmjwatr.shp

?

The -spat is to cut out the boundaries to fit my the EPSG 2953 specified boundaries.

I have tried something similar and got a string of errors saying I needed to provide the transformation information. I may just have the wrong command. If I extract this from the top prj file above, would the following do the job

org2org -a_srs '+proj=latlong +ellps= GRS80 +datumn=NAD83' \ -spat
-60.05 35.00 -63.78 48.07 \ my_nbmjwatr.shp nbmjwatr.shp

?

I assume the dbf file gets imported as well. What happens to the labels which are in the dbf file? In the original shapefiles from Environment Canada the labels are missing from the upper part of New Brunswick because in the original they are over Nova Scotia (image1). Will the labels be readjusted when the original file gets clipped? I can't fine anything on how label placement is determined. However, the first hurdle is getting the basic maps into GRASS because I don't think Quantum can do the above.

I don't know if GRASS can do the nearest neighbour isotherm type of calculation I have proposed above with some king of script but I will be doing more reading or you can suggest where I might look. Unless Quantum would be an easier tool to do the above, I wanted to use it mainly as a viewer for the resulting product.

I may be well over my head here but part of this was to see how difficult the whole business would be. The Open Source approach was in part because of my involvement with watershed groups that can't afford commercial GIS software but could profit from using GIS to look at their data. My best course of action may be to hire someone to actually get the work done first (priority) and I try to duplicate it with GRASS or Quantum on my part. I get blank stares here when I mention either GRASS or Quantum or anything Linux so it would be alternative GIS software if I was to hire someone.

Just as background I am a biology professor of 20 years in a relatively small university (Université de Moncton), in New Brunswick. So I guess I am somewhat of an old dog trying to learn new things. The Apple IIe came out when I was doing my doctorate :) and I actually cut my first teeth on a Unix system so command lines don't bother me.

Thanks in advance for any suggestions/advice or help you care to offer.
If this is not of general interest I can carry on by email with anyone that might want to help a somewhat lost soul. I guess, I am a good example of someone coming from outside of the specific field of GIS.

Thanks

Alyre

_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
Reply | Threaded
Open this post in threaded view
|

Re: New Brunswick User looking for help with GRASS and Quantum GIS - may be of interest to new users

Scott Mitchell-3
In reply to this post by Alyre Chiasson
Dave Sampson has done an excellent job at providing advice for much  
of your message, so I don't have a whole lot to add.  A couple  
points, though:

On 22-Jan-08, at 16:48 , Alyre Chiasson wrote:

> My first concerns are the “unkown”s and the second is that the  
> projection is listed as “Oblique Sterographic” and not “Double”.  
> Maybe “Oblique” is actually a “Stero” projection? Somewhat  
> disconcerting for someone starting out. I confirmed the EPSG code  
> from: http://spatialreference.org/ref/epsg/2953/
>

I haven't used these specific projections, so don't have a lot to  
say, except that presumably if the EPSG code does properly match the  
projection used, OGR / PROJ should be able to take care of all the  
details?  Others on the list, and the OGR list, as Dave points out,  
are going to be much more authoritative than me on this, though.

>
> I assume the dbf file gets imported as well. What happens to the  
> labels which are in the dbf file? In the original shapefiles from  
> Environment Canada the labels are missing from the upper part of  
> New Brunswick because in the original they are over Nova Scotia  
> (image1). Will the labels be readjusted when the original file gets  
> clipped? I can’t fine anything on how label placement is  
> determined. However, the first hurdle is getting the basic maps  
> into GRASS because I don’t think Quantum can do the above.
>

Dave has addressed the fact that yes, the whole "layer" (in ArcGIS-
speak) including the .dbf of attributes comes across in the  
translation.  But the "labels" should not be thought of as the actual  
data.  Think of the spatial entities being in one database (the  
shapefile and its friends), and the coordinates of every object  
(point, line, or area) are in that database, and there's a common ID  
value that allows attribute data in the .dbf to be associated with  
each of those objects.  There is no separate "location of the label"  
- there is just a spatial object with associated geographic  
coordinates, which is linked to various attributes, and these  
attributes can be visualized with different symbology.  So when you  
transform the coordinates in the shapefile, there is only the one set  
of coordinates involved.

In the example of point measurements, the shapefile of points would  
be transformed from one coordinate to another.  Each of these points  
also has an ID, which allows it to be joined to a table of  
attributes.  ONE option for visualizing those points is to map out  
labels.  The position of the label is a combination of the location  
of the point, plus some set of instructions to the specific GIS  
software you're using about how to display that label with reference  
to the point.  Those instructions are specific to whatever software  
you're using.  Pg 265 in the GRASS book (3rd ed.) talks a little bit  
about this, but it would be different for QGIS, because label  
placement is a cartographic question, not inherent to the spatial data.

In your example, if your layer that is driving the label drawing is  
transformed properly, the points should always be in the right location.

I hope that helps, I'm not completely sure I've understood your  
problem correctly.


> I don’t know if GRASS can do the nearest neighbour isotherm type of  
> calculation I have proposed above with some king of script but I  
> will be doing more reading or you can suggest where I might look.  
> Unless Quantum would be an easier tool to do the above, I wanted to  
> use it mainly as a viewer for the resulting product.

Perhaps an interpolation approach would be useful?  See section 6.8  
in the GRASS book.

For any kind of spatial processing work like this, the possibilities  
in QGIS are really just QGIS calling GRASS modules, so really it's  
GRASS doing the "work" and QGIS visualizing it anyway.

>

Cheers,
Scott Mitchell
Carleton University_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
Reply | Threaded
Open this post in threaded view
|

Re: New Brunswick User looking for help with GRASS and Quantum GIS - may be of interest to new users

Scott Mitchell-3
In reply to this post by Alyre Chiasson
Oops, by the time I wrote the rest of my last response, I forgot to  
answer the bit about crossing two UTM zones.  I have run into this,  
and saved a past email exchange on the matter - you can see it in  
convenient summary format at:

http://lists.directionsmag.com/discussion/read.php?f=16&i=2014&t=2003

Cheers,
Scott


On 22-Jan-08, at 16:48 , Alyre Chiasson wrote:

> Hello all,
>
> Thanks for all the offers of help and the suggestion to do an  
> initial post. Perhaps a quick explanation of what I am attempting  
> to do would be in order as well as what resources I have on hand. I  
> have the book, “Open Source GIS: A GRASS GIS Approach” by Netler  
> and Mitasova (second edition, and I just got the third yesterday)  
> and have printed out an “Introduction to the practical use of the  
> Free Geographical Information System GRASS 6.0,” so you can point  
> me to specific pages that might be of help that I may have overlooked.
>
> I have a bunch of shape files from Environment Canada with  
> predicted maximum air temperature increases for New Brunswick (they  
> are actually of the whole Atlantic Region from what I can see) in  
> 30 year blocks to 2100 (Dataset A). They do have “prj” files. Example:
>
> GEOGCS["GCS_North_American_1983",DATUM
> ["D_North_American_1983",SPHEROID["GRS_1980",
> 6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",
> 0.0174532925199433]]
>
> They come up as isotherms (contour lines) and are labeled; the  
> labels are in a dbf file.
>
> I also have shapefiles for the rivers and streams in New Brunswick,  
> including (site/point) data with watercourse names (Dataset B).  
> They also have “prj” files. They also include basic boundaries to  
> the province. Again, here is the prj file.
>
>
> GEOGCS["GCS_North_American_1983",DATUM
> ["D_North_American_1983",SPHEROID["GRS_1980",
> 6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",
> 0.0174532925199433]]
>
> I also have data on mean maximum water temperatures for various  
> rivers across New Brunswick (Dataset C). They are current in an  
> Excel spreadsheet and have the following format:
>
>
> CoordinateSystem XCoordinate YCoordinate CoordinateUnits
> NAD83 (CSRS) NB Stereographic 2394846.697 7657396.666 Meters
>
>
> I also have upper lethal temperature data for most of the  
> freshwater fish of New Brunswick. You can get predicted water  
> temperatures by multiplying air temperature by 0.9 and adding it to  
> the base water temperature. The idea would be for each site where  
> baseline water temperatures are known, the nearest isotherm would  
> be chosen and the predicted increase for that site calculated and  
> labeled. I was also hoping to be able to superimpose on this a  
> layer that would flag temperatures above a certain value. For  
> example, if it happened to be Atlantic salmon, there would be a red  
> dot above 24 C. Increasing red dots over time would means  
> progressive loss of the species (main point of the exercise).
>
> I also bought a copy of NBGEOCALC from Services New Brunswick,  
> which they describe as:
>
> NBGeocalc is a piece of software designed by SNB to help with  
> coordinate conversions and transformations in New Brunswick. It is  
> the accepted standard for transforming coordinates from/to ATS77  
> and NAD83 (CSRS). It is also a very useful tool to convert in all  
> directions, latitudes / longitudes and UTM coordinates
>
> I figure I might get some water temperature data from sports clubs  
> but in lat and long.
>
> From the provincial web site I found that the province uses  
> something called NAD83 (CSRS) Double Sterographic, a screen capture  
> of parameters is attached (image2). I have also found that this  
> corresponds to EPSG code 2953. Out of this I see two options:
>
> 1) Stick with NAD83 of datasets A and B and use GEOCALC to  
> translate the coordinates of dataset 3. Other than being compatible  
> with the province and I don’t know what the advantage of Double  
> Stereographic is and maybe it does not make a difference for what I  
> want to do.
>
> 2) The other option is to covert dataset A and B (shapefiles) and  
> creates a LOCATION and mapset based on a Double Stereographic  
> Projection. I have created a LOCATION using EPSG code 2953 and get  
> the following output from g.proj.
>
> PROJCS["Stereographic",
> GEOGCS["unnamed",
> DATUM["unknown",
> SPHEROID["unnamed",6378137,298.257222101]],
> PRIMEM["Greenwich",0],
> UNIT["degree",0.0174532925199433]],
> PROJECTION["Oblique_Stereographic"],
> PARAMETER["latitude_of_origin",46.5],
> PARAMETER["central_meridian",-66.5],
> PARAMETER["scale_factor",0.999912],
> PARAMETER["false_easting",2500000],
> PARAMETER["false_northing",7500000],
> UNIT["metre",1]]
>
> My first concerns are the “unkown”s and the second is that the  
> projection is listed as “Oblique Sterographic” and not “Double”.  
> Maybe “Oblique” is actually a “Stero” projection? Somewhat  
> disconcerting for someone starting out. I confirmed the EPSG code  
> from: http://spatialreference.org/ref/epsg/2953/
>
> I am also confused as to what kind of coordinate system is being  
> used above (Double Sterographic). Seems like a form of UTM? As a  
> question, if I was to create the LOCATION from scratch based on  
> UTM, how would I go about representing New Bruswick as a LOCATION  
> that actually physically lies within 2 UTM zones? All of the  
> examples that create LOCATIONs based on UTM that I have seen so far  
> are silent on what you do if your LOCATION covers more than one  
> zone. Can you actually query across two LOCATIONs, is that the  
> solution? So what are “Sterographic” coordinates, does everything  
> become the equivalent of a single zone and the projection corrects  
> for errors involved in extrapolating for what would be otherwise  
> traversing from one zone to another?
>
> Assuming that everything above is okay I grasp that I need to  
> reproject the shape files and convert the coordinate system. By  
> example, I have a shape file called nbmjwatr.shp and its associated  
> prj file (first example above). From what I have read so far the  
> conversion can be done with org2org. I am not sure what the command  
> would be, I can’t find an example where the particular prj files is  
> specified or is it automatically read if it is in the same  
> directory? So would the command be
>
> org2org nbmjwatr.shp \ -spat -60.05 35.00 -63.78 48.07 \  
> my_nbmjwatr.shp
>
> ?
>
> The –spat is to cut out the boundaries to fit my the EPSG 2953  
> specified boundaries.
>
> I have tried something similar and got a string of errors saying I  
> needed to provide the transformation information. I may just have  
> the wrong command. If I extract this from the top prj file above,  
> would the following do the job
>
> org2org -a_srs ‘+proj=latlong +ellps= GRS80 +datumn=NAD83’ \ -spat  
> -60.05 35.00 -63.78 48.07 \ my_nbmjwatr.shp nbmjwatr.shp
>
> ?
>
> I assume the dbf file gets imported as well. What happens to the  
> labels which are in the dbf file? In the original shapefiles from  
> Environment Canada the labels are missing from the upper part of  
> New Brunswick because in the original they are over Nova Scotia  
> (image1). Will the labels be readjusted when the original file gets  
> clipped? I can’t fine anything on how label placement is  
> determined. However, the first hurdle is getting the basic maps  
> into GRASS because I don’t think Quantum can do the above.
>
> I don’t know if GRASS can do the nearest neighbour isotherm type of  
> calculation I have proposed above with some king of script but I  
> will be doing more reading or you can suggest where I might look.  
> Unless Quantum would be an easier tool to do the above, I wanted to  
> use it mainly as a viewer for the resulting product.
>
> I may be well over my head here but part of this was to see how  
> difficult the whole business would be. The Open Source approach was  
> in part because of my involvement with watershed groups that can’t  
> afford commercial GIS software but could profit from using GIS to  
> look at their data. My best course of action may be to hire someone  
> to actually get the work done first (priority) and I try to  
> duplicate it with GRASS or Quantum on my part. I get blank stares  
> here when I mention either GRASS or Quantum or anything Linux so it  
> would be alternative GIS software if I was to hire someone.
>
> Just as background I am a biology professor of 20 years in a  
> relatively small university (Université de Moncton), in New  
> Brunswick. So I guess I am somewhat of an old dog trying to learn  
> new things. The Apple IIe came out when I was doing my doctorate :)  
> and I actually cut my first teeth on a Unix system so command lines  
> don't bother me.
>
> Thanks in advance for any suggestions/advice or help you care to  
> offer. If this is not of general interest I can carry on by email  
> with anyone that might want to help a somewhat lost soul. I guess,  
> I am a good example of someone coming from outside of the specific  
> field of GIS.
>
> Thanks
>
> Alyre
>
> <Image1.bmp><Image2.bmp>______________________________________________
> _
> Ottawa_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/ottawa_users

_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
Reply | Threaded
Open this post in threaded view
|

online application for input and management of remote sensing Ground Control Points

regie-2
In reply to this post by Sampson, David

Hello everyone,

   Does anybody know of an application that allows for
input and management of Ground Control Points (GCPs)
for remote sensing? Something that allows users to
input point coordinates along with corresponding
attributes and metadata. Much like OpenStreetMap but
for ground control points.

   The aim is to collect and store user-generated GCPs
which can then be used to analyze/classify remote
sensing data (e.g., Landsat).

Thanks,
Regie


Regie A. Alam
MSc. Candidate
Department of Biology
Laurentian University
Sudbury, Ontario, Canada
_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
Reply | Threaded
Open this post in threaded view
|

Re: online application for input and management of remote sensing Ground Control Points

David Sampson
Interesting application.

I built an extension for FWTools that allowed for the input of
pixel/line values for fuducial points of aerial photos that the matched
them to x,y cordinates from a database for georeferencing photos.

It was a pretty straight forward process. It's just a number matching
game.

As for one that already exists? I am not aware of one.  But if one did
exist it would be great for it to take GPs track logs and waypoints in
GPX format and use those to populate the database. Using GBSbabel in the
back ground would be an asset.

Cheers



On Sat, 2008-02-09 at 19:48 -0500, Regie Alam wrote:

> Hello everyone,
>
>    Does anybody know of an application that allows for
> input and management of Ground Control Points (GCPs)
> for remote sensing? Something that allows users to
> input point coordinates along with corresponding
> attributes and metadata. Much like OpenStreetMap but
> for ground control points.
>
>    The aim is to collect and store user-generated GCPs
> which can then be used to analyze/classify remote
> sensing data (e.g., Landsat).
>
> Thanks,
> Regie
>
>
> Regie A. Alam
> MSc. Candidate
> Department of Biology
> Laurentian University
> Sudbury, Ontario, Canada
> _______________________________________________
> Ottawa_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/ottawa_users

_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users
Reply | Threaded
Open this post in threaded view
|

Re: online application for input and management of remote sensing Ground Control Points

regie-2

Hi Dave,

   Yes, I think it would be an interesting application
and useful too.

   I posted the same question on the OpenAerialMap
mailing list a couple weeks ago but no response so
far.

   The closest model I can find is the geocaching
(http://www.geocaching.com/) one and the Degree of
Confluence Project (http://confluence.org/).

   I also found an open source application called
Cache Magnet
(http://cachemagnet.googlepages.com/home).

Regie





--- Dave Sampson <[hidden email]> wrote:

> Interesting application.
>
> I built an extension for FWTools that allowed for
> the input of
> pixel/line values for fuducial points of aerial
> photos that the matched
> them to x,y cordinates from a database for
> georeferencing photos.
>
> It was a pretty straight forward process. It's just
> a number matching
> game.
>
> As for one that already exists? I am not aware of
> one.  But if one did
> exist it would be great for it to take GPs track
> logs and waypoints in
> GPX format and use those to populate the database.
> Using GBSbabel in the
> back ground would be an asset.
>
> Cheers
>
>
>
> On Sat, 2008-02-09 at 19:48 -0500, Regie Alam wrote:
> > Hello everyone,
> >
> >    Does anybody know of an application that allows
> for
> > input and management of Ground Control Points
> (GCPs)
> > for remote sensing? Something that allows users to
> > input point coordinates along with corresponding
> > attributes and metadata. Much like OpenStreetMap
> but
> > for ground control points.
> >
> >    The aim is to collect and store user-generated
> GCPs
> > which can then be used to analyze/classify remote
> > sensing data (e.g., Landsat).
> >
> > Thanks,
> > Regie
> >
> >
> > Regie A. Alam
> > MSc. Candidate
> > Department of Biology
> > Laurentian University
> > Sudbury, Ontario, Canada
> > _______________________________________________
> > Ottawa_users mailing list
> > [hidden email]
> >
> http://lists.osgeo.org/mailman/listinfo/ottawa_users
>
> _______________________________________________
> Ottawa_users mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/ottawa_users
>

_______________________________________________
Ottawa_users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/ottawa_users