From: Arlindo da S. <da...@al...> - 2007-11-26 02:03:39
|
Graziano, I have an initial implementation of your shapefile "draw polyf" implemented as a GrADS extension. Just check out the Grads module % gacvs co Grads % cd Grads/extensions/shape % make % perldoc shape % setenv GAUDXT ./shape.udxt For convenience I have incorporated libshp with the sources, at least for now. Look at file utShape.gs for an example. You will need the gshhs_land.??? files for running this test, and a GrADS build supporting UDXTs. You should be able to build the sources you just checked out. A few comments: 1) I rearranged your code a bit, grouping together portions that could be reused 2) I added "shp_lines" for my own benefit, it may not be needed in the end as polyf should handle non-closed polygons as well. At this point, though, they do not produce the same output. 3) I am not sure whether "shp_polyf" works as you intended. The polygon fills look funny. 4) The current sources let GrADS handle clipping. Your old function NormalLon (renamed here StdLon) and the InsideDomain() functions are effectively disabled. You may have good reasons for re-enabling them. 5) The documentation needs to be filled in. 6) It would be nice to have a nice set of simple examples, with small files. 7) It appears to me that one should be able to write shapefiles with the contents of the GrADS "metafile" (with coordinates expressed in lat/lon which I believed can be accomplished with the appropriate conversion). I went ahead and put in the skeleton from my "gxyat" extension which grabs the metafile buffer from memory and translates it. This work would be better completed by someone with shapefile familiarity. Better yet, with means of testing it. I have no experience (or personal interest for that matter) in GIS software, but I realize it would be important to reach out to the GIS community. Any volunteers to take this on? (I can help with the metafile translation if needed.) Efren: have you been able to make progress in this area? Please let me know if you have any comments. Arlindo -- Arlindo da Silva da...@al... |
From: Arlindo da S. <da...@al...> - 2007-11-26 22:17:01
|
On Nov 26, 2007 1:00 PM, Efren Serra <efr...@me...> wrote: > Arlindo, > > I can help you with 7) below. > That would be great. Are you familiar with the Shapefile C library? http://shapelib.maptools.org/ Graziano is using it to read shapefiles and I see that t can be used to create files as well. My understanding of shapefiles is limited. Skimming through the documentation I see that it is possible to save polygons to a shapefile. Is there a way to encode things like: - color - transparency - line thickness For example, if one saves line segments from a contour plot, each with different color, some with dashed lines, can they be easily displayed into GIS software? Regarding filled polygons, I remember Brian mentioning that shapefiles have very specific rules about them, and that he would have to rewrite the shading function to be shapefile compliant. Thanks, Arlindo -- Arlindo da Silva da...@al... |
From: Efren S. <efr...@me...> - 2007-11-26 22:25:19
|
I'm more familiar with the Shapefile Perl library than the Shapefile C library. -----Original Message----- From: arl...@gm... [mailto:arl...@gm...] On = Behalf Of Arlindo da Silva Sent: Monday, November 26, 2007 2:17 PM To: efr...@me... Cc: ope...@li... Subject: Re: Shapefile extension: first crack On Nov 26, 2007 1:00 PM, Efren Serra <efr...@me...> wrote: > Arlindo, > > I can help you with 7) below. > That would be great. Are you familiar with the Shapefile C library? http://shapelib.maptools.org/ Graziano is using it to read shapefiles and I see that t can be used to create files as well. My understanding of shapefiles is limited. = Skimming through the documentation I see that it is possible to save polygons to = a shapefile. Is there a way to encode things like: - color - transparency - line thickness For example, if one saves line segments from a contour plot, each with different color, some with dashed lines, can they be easily displayed = into GIS software? Regarding filled polygons, I remember Brian mentioning that shapefiles = have very specific rules about them, and that he would have to rewrite the shading function to be shapefile compliant. Thanks, Arlindo --=20 Arlindo da Silva da...@al... |
From: Arlindo da S. <da...@al...> - 2007-11-27 15:11:42
|
On Nov 26, 2007 5:25 PM, Efren Serra <efr...@me...> wrote: > I'm more familiar with the Shapefile Perl library than the Shapefile C > library. With the perl interface, can you encode colors in a shapefile? Do you have any simple example showing basic things such as - how to draw a line in black, and another in green - how to have a rectangle filled "blue" - how to define new colors from (red,green,blue) values Do you have access to any GIS software? Is there a free alternative to ARC/View? Which one do you recommend? I just want a way to see if the file we eventually produce with GrADS can be visualized by standard GIS software. Thanks, Arlindo -- Arlindo da Silva da...@al... |
From: Efren S. <efr...@me...> - 2007-11-27 18:35:47
|
Arlindo, With the perl interface, can you encode colors in a shapefile? We shouldn't encode colors in the shapefiles; I was hoping to use these shapefiles in conjunction with Mapserver and let the coloring to = mapserver .map configuration file. However, we should encode some values about = the shape in the .dbx file so that we can use mapserver's .map file CLASS = value, which defines thematic classes for a given layer. A CLASS has an = EXPRESSION value that we can use to select coloring, etc., based on a value encoded in = the .dbx file. For instance, here is simple sample for coloring Tropical Cyclone Warnings Wind Radiis/Track: LAYER NAME "al062007_019_34ktWndRadii" GROUP "tcw" METADATA "wms_title" "al062007_019_34ktWndRadii" ##required END TYPE POLYGON STATUS OFF DATA /otsr/shapefiles/2007091100/al062007_019_34ktWndRadii LABELITEM "RADIUS_NM" CLASS NAME "al062007_019_34ktWndRadii" OUTLINECOLOR 255 0 0 LABEL MINFEATURESIZE 50 MINDISTANCE 150 POSITION CC SIZE TINY COLOR 0 0 0 END DEBUG ON END DUMP TRUE PROJECTION "init=3Depsg:4326" ##recommended END END # Layer al062007_019_34ktWndRadii LAYER NAME "ep102007_017_track" GROUP "tcw" METADATA "wms_title" "ep102007_017_track" ##required END TYPE LINE STATUS OFF DATA /otsr/shapefiles/2007091100/ep102007_017_track LABELITEM "STM_NAME" CLASS NAME "ep102007_017_track" COLOR 0 0 0 LABEL MINFEATURESIZE 50 MINDISTANCE 150 POSITION CC SIZE TINY COLOR 0 0 0 END DEBUG ON END DUMP TRUE PROJECTION "init=3Depsg:4326" ##recommended END END # Layer ep102007_017_track - how to draw a line in black, and another in green Mapserver takes care of the drawing for us via the .map file by using OUTLINECOLOR - how to have a rectangle filled "blue" Mapserver takes care of the drawing for us via the .map file by using = COLOR - how to define new colors from (red,green,blue) values COLOR and OUTLINECOLOR take RGB values as shown above. Do you have access to any GIS software? Is there a free alternative to ARC/View? Which one do you recommend? I just want a way to see if the = file we eventually produce with GrADS can be visualized by standard GIS = software. Lets use Mapserver from UMN: http://mapserver.gis.umn.edu. Thanks. Efren |
From: Mike F. <mfi...@gm...> - 2007-11-27 20:48:41
|
hi efren, i took a look a mapserver. is this what fnmoc is using these days? it really isn't gis, i'm partial to google earth. thanks /r mike Efren Serra wrote: > Arlindo, > > With the perl interface, can you encode colors in a shapefile? > > We shouldn't encode colors in the shapefiles; I was hoping to use these > shapefiles in conjunction with Mapserver and let the coloring to mapserver > .map configuration file. However, we should encode some values about the > shape in the .dbx file so that we can use mapserver's .map file CLASS value, > which defines thematic classes for a given layer. A CLASS has an EXPRESSION > value > that we can use to select coloring, etc., based on a value encoded in the > .dbx file. For instance, here is simple sample for coloring Tropical > Cyclone Warnings Wind Radiis/Track: > > LAYER > NAME "al062007_019_34ktWndRadii" > GROUP "tcw" > METADATA > "wms_title" "al062007_019_34ktWndRadii" ##required > END > TYPE POLYGON > STATUS OFF > DATA /otsr/shapefiles/2007091100/al062007_019_34ktWndRadii > > LABELITEM "RADIUS_NM" > > CLASS > NAME "al062007_019_34ktWndRadii" > OUTLINECOLOR 255 0 0 > LABEL > MINFEATURESIZE 50 > MINDISTANCE 150 > POSITION CC > SIZE TINY > COLOR 0 0 0 > END > DEBUG ON > END > > DUMP TRUE > PROJECTION > "init=epsg:4326" ##recommended > END > END # Layer al062007_019_34ktWndRadii > > LAYER > NAME "ep102007_017_track" > GROUP "tcw" > METADATA > "wms_title" "ep102007_017_track" ##required > END > TYPE LINE > STATUS OFF > DATA /otsr/shapefiles/2007091100/ep102007_017_track > > LABELITEM "STM_NAME" > > CLASS > NAME "ep102007_017_track" > COLOR 0 0 0 > LABEL > MINFEATURESIZE 50 > MINDISTANCE 150 > POSITION CC > SIZE TINY > COLOR 0 0 0 > END > DEBUG ON > END > > DUMP TRUE > PROJECTION > "init=epsg:4326" ##recommended > END > END # Layer ep102007_017_track > > - how to draw a line in black, and another in green > > Mapserver takes care of the drawing for us via the .map file by using > OUTLINECOLOR > > - how to have a rectangle filled "blue" > > Mapserver takes care of the drawing for us via the .map file by using COLOR > > - how to define new colors from (red,green,blue) values > > COLOR and OUTLINECOLOR take RGB values as shown above. > > Do you have access to any GIS software? Is there a free alternative to > ARC/View? Which one do you recommend? I just want a way to see if the file > we eventually produce with GrADS can be visualized by standard GIS software. > > Lets use Mapserver from UMN: http://mapserver.gis.umn.edu. Thanks. > > Efren > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Opengrads-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opengrads-devel > > |
From: Efren S. <efr...@me...> - 2007-11-27 21:18:59
|
Mike, Meteorology/Oceanography isn't gis either; that is something ESRI has = never understood. I think Mapserver is as much GIS as GoogleEarth is; it = supports WMS, WCS, WFS protocols, etc., and even KML. GoogleEarth is certainly a nice viewer/client. Mapserver is a server not a client so there is no comparison. You could point a GoogleEarth client to a Mapserver server = that returns KML. -----Original Message----- From: Mike Fiorino [mailto:mfi...@gm...]=20 Sent: Tuesday, November 27, 2007 12:49 PM To: efr...@me... Cc: 'Arlindo da Silva'; ope...@li... Subject: Re: [Opengrads-devel] Shapefile extension: first crack hi efren, i took a look a mapserver. is this what fnmoc is using these days? it really isn't gis, i'm partial to google earth. thanks /r mike Efren Serra wrote: > Arlindo, > > With the perl interface, can you encode colors in a shapefile? > > We shouldn't encode colors in the shapefiles; I was hoping to use=20 > these shapefiles in conjunction with Mapserver and let the coloring to = > mapserver .map configuration file. However, we should encode some=20 > values about the shape in the .dbx file so that we can use mapserver's = > .map file CLASS value, which defines thematic classes for a given=20 > layer. A CLASS has an EXPRESSION value that we can use to select=20 > coloring, etc., based on a value encoded in the .dbx file. For=20 > instance, here is simple sample for coloring Tropical Cyclone Warnings = > Wind Radiis/Track: > > LAYER > NAME "al062007_019_34ktWndRadii" > GROUP "tcw" > METADATA > "wms_title" "al062007_019_34ktWndRadii" ##required > END > TYPE POLYGON > STATUS OFF > DATA /otsr/shapefiles/2007091100/al062007_019_34ktWndRadii > > LABELITEM "RADIUS_NM" > > CLASS > NAME "al062007_019_34ktWndRadii" > OUTLINECOLOR 255 0 0 > LABEL > MINFEATURESIZE 50 > MINDISTANCE 150 > POSITION CC > SIZE TINY > COLOR 0 0 0 > END > DEBUG ON > END > > DUMP TRUE > PROJECTION > "init=3Depsg:4326" ##recommended > END > END # Layer al062007_019_34ktWndRadii > > LAYER > NAME "ep102007_017_track" > GROUP "tcw" > METADATA > "wms_title" "ep102007_017_track" ##required > END > TYPE LINE > STATUS OFF > DATA /otsr/shapefiles/2007091100/ep102007_017_track > > LABELITEM "STM_NAME" > > CLASS > NAME "ep102007_017_track" > COLOR 0 0 0 > LABEL > MINFEATURESIZE 50 > MINDISTANCE 150 > POSITION CC > SIZE TINY > COLOR 0 0 0 > END > DEBUG ON > END > > DUMP TRUE > PROJECTION > "init=3Depsg:4326" ##recommended > END > END # Layer ep102007_017_track > > - how to draw a line in black, and another in green > > Mapserver takes care of the drawing for us via the .map file by using=20 > OUTLINECOLOR > > - how to have a rectangle filled "blue" > > Mapserver takes care of the drawing for us via the .map file by using=20 > COLOR > > - how to define new colors from (red,green,blue) values > > COLOR and OUTLINECOLOR take RGB values as shown above. > > Do you have access to any GIS software? Is there a free alternative to = > ARC/View? Which one do you recommend? I just want a way to see if the=20 > file we eventually produce with GrADS can be visualized by standard=20 > GIS software. > > Lets use Mapserver from UMN: http://mapserver.gis.umn.edu. Thanks. > > Efren > > > > ---------------------------------------------------------------------- > --- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Opengrads-devel mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opengrads-devel > > =20 |
From: Mike F. <mfi...@gm...> - 2007-11-27 22:12:36
|
efren, ok, duh on me... i was fetching on separating the color(rendering?) data from the shape(gis) data. is display data generally(commonly) part of .gis data? i looked at some mapserver examples and agree that putting the rendering data in a separate .map file does make sense... check out: http://www.nohrsc.noaa.gov/interactive/html/map.html for a good(?) demo of mapserver and http://www.nohrsc.noaa.gov/earth/ for a pretty slick display of snow data in google earth i noticed that mapserver does all the geo-vector/raster formats, it wasn't clear if it can output .gis, e.g., display a shapefile from grads and output .kml... ok, i'm onboard, especially since it's web and i've starting doing .php... best /r mike Efren Serra wrote: > Mike, > > Meteorology/Oceanography isn't gis either; that is something ESRI has never > understood. I think Mapserver is as much GIS as GoogleEarth is; it supports > WMS, WCS, WFS protocols, etc., and even KML. GoogleEarth is certainly a > nice viewer/client. Mapserver is a server not a client so there is no > comparison. You could point a GoogleEarth client to a Mapserver server that > returns KML. > > -----Original Message----- > From: Mike Fiorino [mailto:mfi...@gm...] > Sent: Tuesday, November 27, 2007 12:49 PM > To: efr...@me... > Cc: 'Arlindo da Silva'; ope...@li... > Subject: Re: [Opengrads-devel] Shapefile extension: first crack > > > hi efren, i took a look a mapserver. is this what fnmoc is using these > days? it really isn't gis, i'm partial to google earth. thanks /r mike > > Efren Serra wrote: > >> Arlindo, >> >> With the perl interface, can you encode colors in a shapefile? >> >> We shouldn't encode colors in the shapefiles; I was hoping to use >> these shapefiles in conjunction with Mapserver and let the coloring to >> mapserver .map configuration file. However, we should encode some >> values about the shape in the .dbx file so that we can use mapserver's >> .map file CLASS value, which defines thematic classes for a given >> layer. A CLASS has an EXPRESSION value that we can use to select >> coloring, etc., based on a value encoded in the .dbx file. For >> instance, here is simple sample for coloring Tropical Cyclone Warnings >> Wind Radiis/Track: >> >> LAYER >> NAME "al062007_019_34ktWndRadii" >> GROUP "tcw" >> METADATA >> "wms_title" "al062007_019_34ktWndRadii" ##required >> END >> TYPE POLYGON >> STATUS OFF >> DATA /otsr/shapefiles/2007091100/al062007_019_34ktWndRadii >> >> LABELITEM "RADIUS_NM" >> >> CLASS >> NAME "al062007_019_34ktWndRadii" >> OUTLINECOLOR 255 0 0 >> LABEL >> MINFEATURESIZE 50 >> MINDISTANCE 150 >> POSITION CC >> SIZE TINY >> COLOR 0 0 0 >> END >> DEBUG ON >> END >> >> DUMP TRUE >> PROJECTION >> "init=epsg:4326" ##recommended >> END >> END # Layer al062007_019_34ktWndRadii >> >> LAYER >> NAME "ep102007_017_track" >> GROUP "tcw" >> METADATA >> "wms_title" "ep102007_017_track" ##required >> END >> TYPE LINE >> STATUS OFF >> DATA /otsr/shapefiles/2007091100/ep102007_017_track >> >> LABELITEM "STM_NAME" >> >> CLASS >> NAME "ep102007_017_track" >> COLOR 0 0 0 >> LABEL >> MINFEATURESIZE 50 >> MINDISTANCE 150 >> POSITION CC >> SIZE TINY >> COLOR 0 0 0 >> END >> DEBUG ON >> END >> >> DUMP TRUE >> PROJECTION >> "init=epsg:4326" ##recommended >> END >> END # Layer ep102007_017_track >> >> - how to draw a line in black, and another in green >> >> Mapserver takes care of the drawing for us via the .map file by using >> OUTLINECOLOR >> >> - how to have a rectangle filled "blue" >> >> Mapserver takes care of the drawing for us via the .map file by using >> COLOR >> >> - how to define new colors from (red,green,blue) values >> >> COLOR and OUTLINECOLOR take RGB values as shown above. >> >> Do you have access to any GIS software? Is there a free alternative to >> ARC/View? Which one do you recommend? I just want a way to see if the >> file we eventually produce with GrADS can be visualized by standard >> GIS software. >> >> Lets use Mapserver from UMN: http://mapserver.gis.umn.edu. Thanks. >> >> Efren >> >> >> >> ---------------------------------------------------------------------- >> --- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Opengrads-devel mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/opengrads-devel >> >> >> > > > > |
From: Efren S. <efr...@me...> - 2007-11-27 22:25:04
Attachments:
metar2shp.pl
|
Mike, I don't think display information is associated with .gis data. = However, for instance, for METARs, we color code according to the value of = Ceiling or Visibility as in http://adds.aviationweather.gov/metars/description_ifr.php and Ceiling/Visibility can be saved in the .dbf file as I do in the attached Perl script. Notice that Mapserver allows one to do SQL (JOIN, SELECT, etc.) on .dbf files = since they are just MS Excel Spreadsheet. MapServer can generate different outputs from a Vector/Shapefile: GML, = KML, etc. That is why I like Mapserver besides the fact that it runs as a = CGI app through Apache. To use rasters all one has to do is create a World File. Plus it can = become a proxy to other servers and ultimately generate the final = image/product. One can also query Vector/Shapefiles and inquire information on its attributes (e.g., .dbf values). Thanks. -----Original Message----- From: Mike Fiorino [mailto:mfi...@gm...]=20 Sent: Tuesday, November 27, 2007 2:13 PM To: efr...@me... Cc: 'Arlindo da Silva'; ope...@li... Subject: Re: [Opengrads-devel] Shapefile extension: first crack efren, ok, duh on me... i was fetching on separating the color(rendering?) data from the shape(gis) data. is display data generally(commonly) part of .gis data? = i looked at some mapserver examples and agree that putting the rendering data in a separate .map file does make sense...=20 check out: http://www.nohrsc.noaa.gov/interactive/html/map.html for a good(?) demo of mapserver and http://www.nohrsc.noaa.gov/earth/ for a pretty slick display of snow data in google earth i noticed that mapserver does all the geo-vector/raster formats, it = wasn't clear if it can output .gis, e.g., display a shapefile from grads and = output .kml... ok, i'm onboard, especially since it's web and i've starting doing = .php... best /r mike Efren Serra wrote: > Mike, > > Meteorology/Oceanography isn't gis either; that is something ESRI has=20 > never understood. I think Mapserver is as much GIS as GoogleEarth is; = > it supports WMS, WCS, WFS protocols, etc., and even KML. GoogleEarth=20 > is certainly a nice viewer/client. Mapserver is a server not a client = > so there is no comparison. You could point a GoogleEarth client to a=20 > Mapserver server that returns KML. > > -----Original Message----- > From: Mike Fiorino [mailto:mfi...@gm...] > Sent: Tuesday, November 27, 2007 12:49 PM > To: efr...@me... > Cc: 'Arlindo da Silva'; ope...@li... > Subject: Re: [Opengrads-devel] Shapefile extension: first crack > > > hi efren, i took a look a mapserver. is this what fnmoc is using=20 > these days? it really isn't gis, i'm partial to google earth. thanks = > /r mike > > Efren Serra wrote: > =20 >> Arlindo, >> >> With the perl interface, can you encode colors in a shapefile? >> >> We shouldn't encode colors in the shapefiles; I was hoping to use >> these shapefiles in conjunction with Mapserver and let the coloring = to=20 >> mapserver .map configuration file. However, we should encode some=20 >> values about the shape in the .dbx file so that we can use = mapserver's=20 >> .map file CLASS value, which defines thematic classes for a given=20 >> layer. A CLASS has an EXPRESSION value that we can use to select=20 >> coloring, etc., based on a value encoded in the .dbx file. For=20 >> instance, here is simple sample for coloring Tropical Cyclone = Warnings=20 >> Wind Radiis/Track: >> >> LAYER >> NAME "al062007_019_34ktWndRadii" >> GROUP "tcw" >> METADATA >> "wms_title" "al062007_019_34ktWndRadii" ##required >> END >> TYPE POLYGON >> STATUS OFF >> DATA /otsr/shapefiles/2007091100/al062007_019_34ktWndRadii >> >> LABELITEM "RADIUS_NM" >> >> CLASS >> NAME "al062007_019_34ktWndRadii" >> OUTLINECOLOR 255 0 0 >> LABEL >> MINFEATURESIZE 50 >> MINDISTANCE 150 >> POSITION CC >> SIZE TINY >> COLOR 0 0 0 >> END >> DEBUG ON >> END >> >> DUMP TRUE >> PROJECTION >> "init=3Depsg:4326" ##recommended >> END >> END # Layer al062007_019_34ktWndRadii >> >> LAYER >> NAME "ep102007_017_track" >> GROUP "tcw" >> METADATA >> "wms_title" "ep102007_017_track" ##required >> END >> TYPE LINE >> STATUS OFF >> DATA /otsr/shapefiles/2007091100/ep102007_017_track >> >> LABELITEM "STM_NAME" >> >> CLASS >> NAME "ep102007_017_track" >> COLOR 0 0 0 >> LABEL >> MINFEATURESIZE 50 >> MINDISTANCE 150 >> POSITION CC >> SIZE TINY >> COLOR 0 0 0 >> END >> DEBUG ON >> END >> >> DUMP TRUE >> PROJECTION >> "init=3Depsg:4326" ##recommended >> END >> END # Layer ep102007_017_track >> >> - how to draw a line in black, and another in green >> >> Mapserver takes care of the drawing for us via the .map file by using >> OUTLINECOLOR >> >> - how to have a rectangle filled "blue" >> >> Mapserver takes care of the drawing for us via the .map file by using >> COLOR >> >> - how to define new colors from (red,green,blue) values >> >> COLOR and OUTLINECOLOR take RGB values as shown above. >> >> Do you have access to any GIS software? Is there a free alternative=20 >> to >> ARC/View? Which one do you recommend? I just want a way to see if the = >> file we eventually produce with GrADS can be visualized by standard=20 >> GIS software. >> >> Lets use Mapserver from UMN: http://mapserver.gis.umn.edu. Thanks. >> >> Efren >> >> >> >> --------------------------------------------------------------------- >> - >> --- >> This SF.net email is sponsored by: Microsoft >> Defy all challenges. Microsoft(R) Visual Studio 2005. >> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ >> _______________________________________________ >> Opengrads-devel mailing list >> Ope...@li... >> https://lists.sourceforge.net/lists/listinfo/opengrads-devel >> >> =20 >> =20 > > > > =20 |
From: Arlindo da S. <da...@al...> - 2007-11-27 22:19:11
|
On Nov 27, 2007 4:18 PM, Efren Serra <efr...@me...> wrote: > Mike, > > Meteorology/Oceanography isn't gis either; that is something ESRI has never > understood. I think Mapserver is as much GIS as GoogleEarth is; it supports > WMS, WCS, WFS protocols, etc., and even KML. GoogleEarth is certainly a > nice viewer/client. Mapserver is a server not a client so there is no > comparison. You could point a GoogleEarth client to a Mapserver server that > returns KML. > Can Mapserver understand SVG? I mean, with the appropriate metadata provided via a .map file. Arlindo. -- Arlindo da Silva da...@al... |
From: Efren S. <efr...@me...> - 2007-11-27 22:26:58
|
http://mapserver.gis.umn.edu/docs/howto/svg-howto Note that Mapserver is built on the GDAL/OGR library and hence, it can = be extended to pretty much generate anything one wants from a single ESRI Shapefile. -----Original Message----- From: arl...@gm... [mailto:arl...@gm...] On = Behalf Of Arlindo da Silva Sent: Tuesday, November 27, 2007 2:19 PM To: efr...@me... Cc: Mike Fiorino; ope...@li... Subject: Re: [Opengrads-devel] Shapefile extension: first crack On Nov 27, 2007 4:18 PM, Efren Serra <efr...@me...> wrote: > Mike, > > Meteorology/Oceanography isn't gis either; that is something ESRI has=20 > never understood. I think Mapserver is as much GIS as GoogleEarth is; = > it supports WMS, WCS, WFS protocols, etc., and even KML. GoogleEarth=20 > is certainly a nice viewer/client. Mapserver is a server not a client = > so there is no comparison. You could point a GoogleEarth client to a=20 > Mapserver server that returns KML. > Can Mapserver understand SVG? I mean, with the appropriate metadata = provided via a .map file. Arlindo. --=20 Arlindo da Silva da...@al... |
From: Arlindo da S. <da...@al...> - 2007-11-28 01:48:51
|
On 11/27/07, Efren Serra <efr...@me...> wrote: > http://mapserver.gis.umn.edu/docs/howto/svg-howto > > Note that Mapserver is built on the GDAL/OGR library and hence, it can be > extended to pretty much generate anything one wants from a single ESRI > Shapefile. Actually, I was asking whether SVG would be a viable INPUT format for Mapsever. I guess I need to understand what exactly you would like to use GrADS for, and then find the best way to interface to Mapserver. Let me digress just bit... 1) As you know GrADS graphics are all vector instructions. At this point even fonts are rendered internally. Image generation relies on libraries such as gd (printim) and cairo (gxyat) for rasterization. 2) At a higher level GrADS can produce contour plots, filled contours (shaded) plots, streamlines, wind barbs, wind vectors, station model plots (with rendered). An these can be produced without any maps, frames, axis, etc. Just naked plots at the surface of the earth. Are these the kind of output that you would like to ingest into Mapserver for further compositing? 3) Right now these can be written out as vector output in encapsulated postscript, PDF or SVG. In the beginning of this thread I commented that one might be able to write these vector instructions as shapefiles (.shp, .shx, and .dbf) --- I need to read the shapefile white paper to better understand the functionn of these 3 files. 4) If SVG is a viable *input* format for Mapserver then a little tweak in the on-line version of gxyat might allow us to write some extra metadata to make Mapserver happy. This could be a quicker approach to achieve what you need, bypassing shapefiles altogether. Not that shapefiles wouldn't be useful for truly GIS desktopers... 5) Here at NASA/GSFC we provide our homegrown WMS server with nice PNG images which it then servers to the world, e.g., http://www.map.nasa.gov/cgi-bin/tc4-d5fcst-hwl.cgi I am assuming that you are pursuing a vector graphics approach for speed and scalability. Am I correct? Arlindo |
From: Efren S. <efr...@me...> - 2007-11-28 19:23:41
|
-----Original Message----- From: arl...@gm... [mailto:arl...@gm...] On = Behalf Of Arlindo da Silva Sent: Tuesday, November 27, 2007 5:49 PM To: efr...@me... Cc: Mike Fiorino; ope...@li... Subject: Re: [Opengrads-devel] Shapefile extension: first crack On 11/27/07, Efren Serra <efr...@me...> wrote: > http://mapserver.gis.umn.edu/docs/howto/svg-howto > > Note that Mapserver is built on the GDAL/OGR library and hence, it can = > be extended to pretty much generate anything one wants from a single=20 > ESRI Shapefile. Actually, I was asking whether SVG would be a viable INPUT format for Mapsever. I guess I need to understand what exactly you would like to = use GrADS for, and then find the best way to interface to Mapserver. Let me digress just bit... I was hoping to use GrADS to generate Shapefiles; this provides the = ability to zoom in/out, do rubber-banding, querying features, etc. 1) As you know GrADS graphics are all vector instructions. At this point even fonts are rendered internally. Image generation relies on libraries such as gd (printim) and cairo (gxyat) for rasterization. 2) At a higher level GrADS can produce contour plots, filled contours (shaded) plots, streamlines, wind barbs, wind vectors, station model = plots (with rendered). An these can be produced without any maps, frames, = axis, etc. Just naked plots at the surface of the earth. Are these the kind of output that you would like to ingest into Mapserver for further = compositing? These can be left as transparent raster layers to ingest into Mapserver since things such as wind barbs are not very well put into Shapefiles. 3) Right now these can be written out as vector output in encapsulated postscript, PDF or SVG. In the beginning of this thread I commented that = one might be able to write these vector instructions as shapefiles (.shp, = .shx, and .dbf) --- I need to read the shapefile white paper to better = understand the functionn of these 3 files. I think wind barbs are hard to encode in Shapefiles specially when one = zooms in, eh? 4) If SVG is a viable *input* format for Mapserver then a little tweak = in the on-line version of gxyat might allow us to write some extra metadata = to make Mapserver happy. This could be a quicker approach to achieve what = you need, bypassing shapefiles altogether. Not that shapefiles wouldn't be useful for truly GIS desktopers... Mapserver can generate SVG from Shapefiles; I don't know if Mapserver = can read SVG and generate raster images. 5) Here at NASA/GSFC we provide our homegrown WMS server with nice PNG images which it then servers to the world, e.g., http://www.map.nasa.gov/cgi-bin/tc4-d5fcst-hwl.cgi I am assuming that you are pursuing a vector graphics approach for speed = and scalability. Am I correct? This would be up to the client side; we tend to focus more on the server endpoints. Arlindo |
From: Arlindo da S. <da...@al...> - 2007-12-11 21:47:49
|
Efren, I am back from vacation. I read quickly the ESRI white paper that describes the shapefile format. What an awkward format! SVG appears a much more elegant approach to vector graphics. In any event, here are my thoughts on how to produce shapefiles from within GrADS: 0) I would produce shapefiles associated with 2D lat-lon "naked plots", that is, those without maps, frames or fonts. Anything else may not make much sense. (Since GrADS draws its own characters, fonts could encoded as polylines but they would be deformed if a map transformation is later applied.) 1) GrADS vector graphics includes both POLYLINES and POLYGON type of shapes. Since one can only have one type of shape per shapefile, a given image (say contour lines on top of shaded contours) would have 2 separate shapefiles associated with it: one with POLYGONS, another with POLYLINE objects, for a total of 6 files if you factor in the .shp, .shx and .dbx subfiles. This is ugly. 2) There is an annoying requirement on the enconding of polygons: one must order the vertices so that the "inside" is to the right of the path, something that should have been handled by the renderer. I believe cairo provides functions to determine whether a point is inside or outside a closed path, so I may be able to use it. 3) Each polygon object would have a single part so as to avoid dealing with similar vertex ordering issues. 4) Now, each POLYLINE or POLYGON object will have a color associated with it. I am hoping one could save the (r,g,b) values in the associated .dbx file, but I am not sure what are the conventions for encoding this. 5) In the case of shaded contours, I am not sure how to encode the color bar (mapping of (r,g,b) into field values). With all these caveats, would GrADS produced shapefiles still be of any interest? I believe Brian has looked into this as well, I'm cc'ing him as he may not be subscribed to this list. Brian: for reference, here is the thread: http://sourceforge.net/mailarchive/forum.php?thread_name=77fcd6b20711251803j746a965j689063db5d6e4da8%40mail.gmail.com&forum_name=opengrads-devel Arlindo -- Arlindo da Silva da...@al... |
From: <efr...@me...> - 2007-12-11 22:57:49
|
Arlindo, > Efren, > > I am back from vacation. I read quickly the ESRI white paper that > describes the shapefile format. What an awkward format! SVG appears a > much more elegant approach to vector graphics. In any event, here are > my thoughts on how to produce shapefiles from within GrADS: > > 0) I would produce shapefiles associated with 2D lat-lon "naked > plots", that is, those without maps, frames or fonts. Anything else > may not make much sense. (Since GrADS draws its own characters, fonts > could encoded as polylines but they would be deformed if a map > transformation is later applied.) > > 1) GrADS vector graphics includes both POLYLINES and POLYGON type of > shapes. Since one can only have one type of shape per shapefile, a > given image (say contour lines on top of shaded contours) would have 2 > separate shapefiles associated with it: one with POLYGONS, another > with POLYLINE objects, for a total of 6 files if you factor in the > .shp, .shx and .dbx subfiles. This is ugly. > > 2) There is an annoying requirement on the enconding of polygons: one > must order the vertices so that the "inside" is to the right of the > path, something that should have been handled by the renderer. I > believe cairo provides functions to determine whether a point is > inside or outside a closed path, so I may be able to use it. > > 3) Each polygon object would have a single part so as to avoid dealing > with similar vertex ordering issues. > > 4) Now, each POLYLINE or POLYGON object will have a color associated > with it. I am hoping one could save the (r,g,b) values in the > associated .dbx file, but I am not sure what are the conventions for > encoding this. > > 5) In the case of shaded contours, I am not sure how to encode the > color bar (mapping of (r,g,b) into field values). > When you create the shape, assign attributes like so: my $shapefile = new Geo::Shapelib { Name => "path to shapefile", Shapetype => POINT, FieldNames => ['ID','Red','Green','Blue',], FieldTypes => ['Integer','Integer','Integer','Integer',], }; and assign values like this: push @{$shapefile->{Shapes}},{ Vertices => [[$x,$y,0,0]] }; push @{$shapefile->{ShapeRecords}},[$ID,$Red,$Green,$Blue]; > With all these caveats, would GrADS produced shapefiles still be of > any interest? I believe Brian has looked into this as well, I'm cc'ing > him as he may not be subscribed to this list. > Absolutely! Let me know where I can help. Thanks. > Brian: for reference, here is the thread: > > http://sourceforge.net/mailarchive/forum.php?thread_name=77fcd6b20711251803j746a965j689063db5d6e4da8%40mail.gmail.com&forum_name=opengrads-devel > > Arlindo > > -- > Arlindo da Silva > da...@al... > ---------------------------------------------------------------------- This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. |
From: Brian D. <do...@co...> - 2007-12-11 22:44:49
|
My research into the shapefile format led me to conclude that the shaded contour routine in grads will need to be rewritten; Arlindo points out some (not all) of the reasons. I am working on this for v2. We also anticipate implementing shapefile support in grads in collaboration with the CPC during 2008... Brian On Dec 11, 2007, at 4:47 PM, Arlindo da Silva wrote: > Efren, > > I am back from vacation. I read quickly the ESRI white paper that > describes the shapefile format. What an awkward format! SVG appears a > much more elegant approach to vector graphics. In any event, here are > my thoughts on how to produce shapefiles from within GrADS: > > 0) I would produce shapefiles associated with 2D lat-lon "naked > plots", that is, those without maps, frames or fonts. Anything else > may not make much sense. (Since GrADS draws its own characters, fonts > could encoded as polylines but they would be deformed if a map > transformation is later applied.) > > 1) GrADS vector graphics includes both POLYLINES and POLYGON type of > shapes. Since one can only have one type of shape per shapefile, a > given image (say contour lines on top of shaded contours) would have 2 > separate shapefiles associated with it: one with POLYGONS, another > with POLYLINE objects, for a total of 6 files if you factor in the > .shp, .shx and .dbx subfiles. This is ugly. > > 2) There is an annoying requirement on the enconding of polygons: one > must order the vertices so that the "inside" is to the right of the > path, something that should have been handled by the renderer. I > believe cairo provides functions to determine whether a point is > inside or outside a closed path, so I may be able to use it. > > 3) Each polygon object would have a single part so as to avoid dealing > with similar vertex ordering issues. > > 4) Now, each POLYLINE or POLYGON object will have a color associated > with it. I am hoping one could save the (r,g,b) values in the > associated .dbx file, but I am not sure what are the conventions for > encoding this. > > 5) In the case of shaded contours, I am not sure how to encode the > color bar (mapping of (r,g,b) into field values). > > With all these caveats, would GrADS produced shapefiles still be of > any interest? I believe Brian has looked into this as well, I'm cc'ing > him as he may not be subscribed to this list. > > Brian: for reference, here is the thread: > > http://sourceforge.net/mailarchive/forum.php? > thread_name=77fcd6b20711251803j746a965j689063db5d6e4da8% > 40mail.gmail.com&forum_name=opengrads-devel > > Arlindo > > -- > Arlindo da Silva > da...@al... |
From: <efr...@me...> - 2007-12-11 22:49:52
|
Fellows, Have you guys looked into Geo::Shapelib Perl package for generating POLYGONs? > My research into the shapefile format led me to conclude that the > shaded contour routine in grads will need to be rewritten; Arlindo > points out some (not all) of the reasons. I am working on this for > v2. We also anticipate implementing shapefile support in grads in > collaboration with the CPC during 2008... Brian > > On Dec 11, 2007, at 4:47 PM, Arlindo da Silva wrote: > > > Efren, > > > > I am back from vacation. I read quickly the ESRI white paper that > > describes the shapefile format. What an awkward format! SVG appears a > > much more elegant approach to vector graphics. In any event, here are > > my thoughts on how to produce shapefiles from within GrADS: > > > > 0) I would produce shapefiles associated with 2D lat-lon "naked > > plots", that is, those without maps, frames or fonts. Anything else > > may not make much sense. (Since GrADS draws its own characters, fonts > > could encoded as polylines but they would be deformed if a map > > transformation is later applied.) > > > > 1) GrADS vector graphics includes both POLYLINES and POLYGON type of > > shapes. Since one can only have one type of shape per shapefile, a > > given image (say contour lines on top of shaded contours) would have 2 > > separate shapefiles associated with it: one with POLYGONS, another > > with POLYLINE objects, for a total of 6 files if you factor in the > > .shp, .shx and .dbx subfiles. This is ugly. > > > > 2) There is an annoying requirement on the enconding of polygons: one > > must order the vertices so that the "inside" is to the right of the > > path, something that should have been handled by the renderer. I > > believe cairo provides functions to determine whether a point is > > inside or outside a closed path, so I may be able to use it. > > > > 3) Each polygon object would have a single part so as to avoid dealing > > with similar vertex ordering issues. > > > > 4) Now, each POLYLINE or POLYGON object will have a color associated > > with it. I am hoping one could save the (r,g,b) values in the > > associated .dbx file, but I am not sure what are the conventions for > > encoding this. > > > > 5) In the case of shaded contours, I am not sure how to encode the > > color bar (mapping of (r,g,b) into field values). > > > > With all these caveats, would GrADS produced shapefiles still be of > > any interest? I believe Brian has looked into this as well, I'm cc'ing > > him as he may not be subscribed to this list. > > > > Brian: for reference, here is the thread: > > > > http://sourceforge.net/mailarchive/forum.php? > > thread_name=77fcd6b20711251803j746a965j689063db5d6e4da8% > > 40mail.gmail.com&forum_name=opengrads-devel > > > > Arlindo > > > > -- > > Arlindo da Silva > > da...@al... > > ---------------------------------------------------------------------- This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery. |