Quantcast
Channel: MapWindow 4
Viewing all 129 articles
Browse latest View live

New Post: Release candidate available

$
0
0
Thank you Paul. I have been searching for five hours now on how to rotate labels. I remember a few years ago I was able to do this with a "rotation" field in the table.
How can I make that work again?

Thanks,
Glen

New Post: Release candidate available

$
0
0
Paul,

where can I download a complete set of source code plus proper version of DLLs and/or OCX.

I tried Map6 and dotSpatial, Unfortunately, Map6 has a crash bug that is hard to pin down and dotspatial demomap lacks the features of MapWin4.

I downloaded several other map type projects, eg LineSiter, Marine Life as example code. I was able to use these project to build Map6 without compiler error. Unfortunately, none of these project has the "query" function I needed,

If I can get a Map4x project built and run, I will be able to debug the crash bug for Map6. Can you help. I just need a workable set of Mapwin source code and proper DLLs/OCX.

thanks

YT

New Post: Release candidate available

$
0
0
MapWindow4 uses MapWinGIS.ocx as mapping engine. MapWindow6 uses DotSpatial as mapping engine.
These are two different applications.

To get the source code of MapWinGIS you can go to https://mapwingis.codeplex.com
If you go to the download tab you can get the ocx-only installer. you can drop the ocx on your own form.

The current source code of MapWindow4 is available at http://svn.mapwindow.org/svnroot/MapWindow4Dev/

New Post: Release candidate available

$
0
0
Thanks for your reply. I can't get passed the crash issue of Map6. Will try the ocx routine to get a better understanding of the Map engine,

New Post: Enlisting labels as "virtual attributes"

$
0
0
I raised this idea a couple of years ago, but can't find a copy of the message. So here's the idea anew. (Please forgive my idiosyncratic use of terms. I'm not a database programmer and I'm unsteady with the lingo.)

Currently, MapWindow colorizes a shape according to an attribute in a database column. This means that if the same shape is used for different attributes, there must be a column in the database file for each of those attributes. This makes sense, and is standard practice.

However, MapWindow also offers the option of assigning labels which are not themselves in the database file. These labels can be text strings, or they can be values computed mathematically from various columns in the database.

It occurs to me that MapWindow can economize on database space and maintenance if a label could be employed as a "virtual attribute," such that a shape would receive its color based on the label instead of on an actual attribute.

Here's an example, based on my own application (MapElection.org). This application offers maps of Chicago, each of which shows one statistic from each of Chicago's 2500 voting precincts in the 2011 mayoral election.

Let's assume the following:

E = Votes received by Rahm Emanuel
C = Votes received by Gary Chico

This requires a database that has two data columns, one for Emanuel and the other for Chico.
This allows me to create just two basic maps.

Now suppose I want to create additional maps, each showing one of the following statistics for each precinct:

E+C = Total votes cast
E/(E+C) = Proportion of votes received by Emanuel
C/(E+C) = Proportion of votes received by Chico
E-C = Lead of Emanual over Chicago
C-E = Lead of Chicago over Emanuel

In the current version of MapWindow, I would have to create five more columns in the database.

However, if labels could be used as "virtual attributes," I wouldn't have to create any new columns. I could simply create a new layer and tell MapWindows to base the color of each shape not on a database column, but instead on the result of a label computation. The label computation, of course, would be one of the above formulas.

With such an option, I could do the following without adding columns to the database, or otherwise altering the database in any way:
  • If I discover a formula was incorrect, I could simply edit the formula in the layer definition.
  • I could almost effortlessly add an abundance of complex new layers to a project.
To minimize the programming impact of introducing an option like this into MapWindow, a "virtual attribute" could simply be created as an additional coloring option available for any normal layer.

Thanks for considering this idea!

Regards,

Roy

Reviewed: MapWindow GIS 4.1 (июл 25, 2013)

$
0
0
Rated 4 Stars (out of 5) - I can't in good mind deduct any stars because all software has bugs, and this release is still rock solid awesome!

Released: MapWindow GIS v4.8.8 - Stable Release - 32Bit (Aug 01, 2013)

$
0
0
Changes since v4.8.8-RC1:
  • This is the last stable release (SR) for v4.8.8
  • Kriging plug-in: Made some minor improvements to prevent crashes when using large point shapefiles. (Paul Meems)
  • Added a dialect projection for EPSG:32633 (Paul Meems)
  • MapWinGIS: New methods: Shapefile.set_ShapeCategory2(shapeIndex, categoryName), Shapefile.set_ShapeCategory3(shapeIndex, category), ShapefileCategories.get_CategoryIndex(category), ShapefileCategories.get_CategoryIndexByName(name) to provide more friendly API. (Sergei Leschinsky)
  • GraphPlugin: Made some minor changes.(Paul Meems)
  • mwSwat: Distances to weather stations now measured in projected units (metres). (Chris George)
  • Minor change of the message for the user when the projection is found (Paul Meems)
  • Fix for issue #2309: Zoom to selected. Conflict between old selection code and new code, is fixed now (Paul Meems)
  • Fix for issue #2308: Create Centroids always crashes MapWindow (Paul Meems)

Created Release: MapWindow GIS v4.8.8 - Stable Release - 32Bit (aug 01, 2013)

$
0
0
Changes since v4.8.8-RC1:
  • This is the last stable release (SR) for v4.8.8
  • Kriging plug-in: Made some minor improvements to prevent crashes when using large point shapefiles. (Paul Meems)
  • Added a dialect projection for EPSG:32633 (Paul Meems)
  • MapWinGIS: New methods: Shapefile.set_ShapeCategory2(shapeIndex, categoryName), Shapefile.set_ShapeCategory3(shapeIndex, category), ShapefileCategories.get_CategoryIndex(category), ShapefileCategories.get_CategoryIndexByName(name) to provide more friendly API. (Sergei Leschinsky)
  • GraphPlugin: Made some minor changes.(Paul Meems)
  • mwSwat: Distances to weather stations now measured in projected units (metres). (Chris George)
  • Minor change of the message for the user when the projection is found (Paul Meems)
  • Fix for issue #2309: Zoom to selected. Conflict between old selection code and new code, is fixed now (Paul Meems)
  • Fix for issue #2308: Create Centroids always crashes MapWindow (Paul Meems)

New Post: [How-to] Colorize individual shapes

$
0
0
A lot of questions on the MapWindow/MapWinGIS forums are about the new categories. They are very powerful but for some simple tasks it was not so easy.

A few days ago Sergei introduced a few new methods to make it easier to assign a custom category to a shape.
These new methods made it in the Stable Release which I published just a minute ago. Go to the download section of this site.

We've created a C# example and a VB.NET example.
The C# version can be downloaded here: http://svn.mapwindow.org/svnroot/TestingScripts/TestColorUniqueShapes.cs
The VB.NET code is:
    Dim sf As Shapefile = New Shapefile()

    If sf.Open("C:\Users\Meems\Desktop\United States\Shapefiles\lakes.shp") Then
      Dim utls As Utils = New Utils()

      Dim ctOrange As ShapefileCategory = sf.Categories.Add("Orange")
      ctOrange.DrawingOptions.FillColor = utls.ColorByName(tkMapColor.Orange)

      Dim ctBlue As ShapefileCategory = sf.Categories.Add("Blue")
      ctBlue.DrawingOptions.FillColor = utls.ColorByName(tkMapColor.Blue)

      For i As Integer = 0 To sf.NumShapes - 1
        If i Mod 2 = 0 Then
          sf.ShapeCategory2(i) = "Orange"
        Else
          sf.ShapeCategory3(i) = ctBlue
        End If
      Next i

      For i As Integer = 0 To sf.NumShapes - 1
        System.Diagnostics.Debug.Print("Shape category: {0}, {1}", i, sf.ShapeCategory2(i))
      Next i

      For i As Integer = 0 To sf.NumShapes - 1
        System.Diagnostics.Debug.Print("Shape category: {0}, {1}", i, sf.ShapeCategory3(i).Name)
      Next i

      ' Add the data to the map:
      AxMap1.AddLayer(sf, True)
    End If
Please download the latest installer and update your project.
If you have questions, please post them here and we'll try to answer them.

New Post: [How-to] Colorize individual shapes

$
0
0
To further Paul's email and to answer my own question on the Forum re changing a single shape's outline:

The documentation reports the C# call Shapefile.set_ShapeCategory (int ShapeIndex, int pVal ) .

It is good to know however, that in vb.net you skip the set_ en get_ prefixes of the functions (or at least in VS2008) and that the call format is different as well. Btw, there are now two more options to change a single shape visualisation attribute: set_ShapeCategory2 and set_ShapeCategory3 with different call lists.
So, to set/change the outline of a poly in VB.Net, you could use the following code:
........
Dim shpfile As New MapWinGIS.Shapefile
shpfile.Open(ShpPath, Me)

Dim ShapeIndex as integer = 5  'pick a shape in the shapefile
Dim utils As MapWinGIS.Utils = New MapWinGIS.Utils
Dm ct ShapefileCategory = sf.Categories.Add("SomeName")
   
 ct.DrawingOptions.FillColor = utils.ColorByName(MapWinGIS.tkMapColor.Blue)
 ct.DrawingOptions.LineColor = utils.ColorByName(MapWinGIS.tkMapColor.Red)
 ct.DrawingOptions.LineWidth = 4

shpfile.ShapeCategory3(ShapeIndex) = ct
AxMap1.AddLayer(shpfile, True)
AxMap1.Redraw()
Please note that the category name ("SomeName" in the code example) is not checked for uniqueness and this could cause problems if used in the ShapeCategory2 call.

Thanks to Paul and Sergei for their help in resolving this issue.

Source code checked in, #72966

$
0
0
New simplified template plug-in.

Source code checked in, #72967

$
0
0
First commit of a new plug-in for MapWindow v4.8.8+ This simple plug-in lets you rotate labels based on a attribute value, as requested by Glen Ames

New Post: Mapwindow setup files corrupt

$
0
0
I am trying to install MapWindow 4.88 SR and I keep getting the error that setup files are corrupt. Has anyone encountered this problem?

New Post: Mapwindow setup files corrupt

$
0
0
Did you try downloading it again? Perhaps your firewall or virus scanner is making it corrupt?
I haven't heard anybody else that is experiencing these problems.

Paul

New Post: Source code for MapWindow

$
0
0
Thanks pmeems
I have the same problem ( I would like to download the complete source code of the application of mapWindows)
but
SVN client asks for username and password
( quest/quest wont work )
any help would be greatly appriciated

ert.

New Post: source code for Mapwindow 4x setup

$
0
0
I used to Mapwindow setup to customize the installer using the MapWindowApp.iss.
where would I find that for version Mapwindow 4.8.8

New Post: How to Buffer a point

$
0
0
I need assist how to create buffer shapefile point.i just can open the shape file here is my source code with VB.6

Private Sub cmdopenbuffer_Click()
Dim sf As New MapWinGIS.Shapefile
sf.Open ("")
Map1.AddLayer sf, True
End Sub

New Post: How to Buffer a point

$
0
0
Here's some code. Not tested!
And I'm a C# developer and not a VB.NET developer ;)
-- Open input shapefile:
Dim sf As New MapWinGIS.Shapefile
sf.Open ("") -- input shapefile

-- Create output shapefile
Dim sfBuffer As New MapWinGIS.Shapefile
--http://www.mapwindow.org/documentation/mapwingis4.8/group__shapefile__management.html#ga9501a0b966bccd163e66468d8b712bd3
sfBuffer.CreateNewWithShapeID("", ShpfileType.SHP_POLYGON)
-- Optional add additional fields
Dim i As Integer = 0
While i > sf.numShapes
    -- Create output shape:
       Dim shpBuffer As New MapWinGIS.Shape
       -- Buffer
       -- http://www.mapwindow.org/documentation/mapwingis4.8/class_shape.html#ad4063312b170dcee5f6065b3dfcef0d9
       shpBuffer = sf.Shape[i].Buffer(distance, 16)
      -- Add buffered shape to output shapefile:
      Dim index As Integer = sfBuffer.NumShapes;
      -- http://www.mapwindow.org/documentation/mapwingis4.8/group__shapefile__editing.html#ga818337589b47b96312bb01d67406f590
      If Not sfBuffer.EditInsertShape(shpBuffer, index) Then
          MessageBox.Show("Failed to insert shape: " + sfBuffer.ErrorMsg(sfBuffer.LastErrorCode))
          Return
      End If
      -- Optional: fill additional fields
End While

-- Optional save output to disk:
-- http://www.mapwindow.org/documentation/mapwingis4.8/group__shapefile__management.html#gadac0d7528183a1a272231c4ddfdce627
sfBuffer.SaveAs()

-- Add shapefiles to map:
Map1.AddLayer sf, True 
Map1.AddLayer sfBuffer, True 

New Post: How to Buffer a point

$
0
0
Thannks Your assist because I am a beginner for programming especially for mapwingis.my basic education is geography so this script is helpful me.

New Post: Geocoding and API Key

$
0
0
I am attempting to use the Google Geocoding Plugin. It calls for a Google Map API key. The plugin references the url where I can get an API key. That url suggests that a key is optional and directs me to a different url if I still want one. I've gone through the steps for generating the key and entered it into the plugin; however, the Geocoder still does not find any addresses I've entered. For example, I've entered "300 W. Washington St., Greensboro, NC, USA" without success.

Has anyone successfully used the plugin and tell me what I'm doing wrong?
Viewing all 129 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>