Quantcast
Channel: DotSpatial
Viewing all 3973 articles
Browse latest View live

New Post: MapPolygonLayer don't show labels

$
0
0
Hi,
when i add labels for MapPolygonLayer, the labels is not showed. please help me check.

private void SetLayerLabel(IFeatureLayer layerObj, string strExpression)
{
        var sbLable = new StringBuilder();
        sbLable.Append("[");
        sbLable.Append(strExpression);
        sbLable.Append("]");
        layerObj.ShowLabels = true;
        LabelSymbolizer labelObj =  new LabelSymbolizer()
            {
                FontFamily = "Arial",
                FontSize = 12,
                FontStyle = FontStyle.Regular,
                Orientation = ContentAlignment.MiddleCenter,
                PartsLabelingMethod = PartLabelingMethod.LabelAllParts
            };
            layerObj.AddLabels(sbLable.ToString(), "", labelObj, "Label");
            layerObj.LabelLayer.Symbolizer.PreventCollisions = true;
}

thanks.

New Post: MapPolygonLayer don't show labels

$
0
0
have a look at the "label operations" tutorial at this link

I never tried it, just knew about its existence

hope this helps you

Oscar

New Post: MapPolygonLayer don't show labels

$
0
0
Hi Oscar,
Thanks.

I try, but still not show.

New Post: Find layer when rightclick on map view

$
0
0
Hi,
I am looking for a way to find which layer is under mouse when it is right clicked on map viewer..I want to have a custom context menu based on layer that is right clicked on but I dont know how to find the layer under mouse click..How can I find it?is it even possible to combine this function to select tool?
Thank you for your help

New Post: Cast DotSpatial.Data.PolygonShapefile to Imap Layer

$
0
0
Hi,
I want to add a feature set to specified point in map layers.I used this code to add it
IFeatureSet iFeatureSet = FeatureSet.Open(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), @"OfflineLayers\Soils.shp"));
                    
IMapLayer lay1 =(IMapLayer) iFeatureSet;
                     map.Layers.Insert(2, lay1);
                     IMapFeatureLayer lay = map.Layers[2];
But I can not cast 'DotSpatial.Data.PolygonShapefile' to type 'DotSpatial.Controls.IMapLayer' is there any way to fix this problem?
Thank you

New Post: Possible bug in feature Selection

$
0
0
To people that might have my problem it was because of reprojection of layer on the fly..It fixed now

New Post: Attribute in Unicode font?

$
0
0
Hi dear buddy!
Do you find any solve way to this problem?
I also have this problem!
Could you help me please?
Many thanks!

New Post: Attribute in Unicode font?

$
0
0
Hi CodePlex1987,

Unicode font is not a problem any more with Dotspatial Version 1.6 and 1.7.

To pass my problem, I add an additional file with same name as Shp file with extention = *.cgp. I use Unicode font (UTF-8). Therefore, In the content of the file, I enter UTF-8.

For example, my shp file is Dancu.shp; I create a new file with name: Dancu.cpg. In the content of the file, I enter UTF-8. (see the image below)

Image

Image

Hope this helpful.

GIS for Sustainable Development.

Ngô Đăng Trí
from Vietnam
http://muabanpiano.net

Updated Wiki: DotSpatial Tutorials

$
0
0

Tutorials

Should I create an extension or an application?

Extension Development

How to Create an Extension

Create an Extension to Import an Excel Worksheet

Create an Extension to Analyze Vector and Raster Data

Using PointSymbolizer on a DrawingLayer

How to Sort Layers Alphabetically

Using MEF Contracts to Coordinate Communication Between Extensions (Advanced)

 

Application Development

Basic DotSpatial Desktop Mapping

How to Support Loading Extensions (Loading GDAL)

How to Add Support for Loading DotSpatial.Plugins.Ribbon

How to Load DotSpatial Extensions Into My Toolbar

Composing an Application by Combining Extensions

Getting started with MEF (Managed Extension Framework)

 

How Do I (End User Documentation)

Finding and Installing the WebMap Extension

Getting Started with Attribute Data Explorer

 

Related Projects

How to Customize Branding of MapWindow 6

 

While the above tutorials use C# code examples, you may use a tool to convert C# to VB.NET.

The following tutorials are developed by Tevaganthan and Daniel Ames, but they were written before the V1 release of DotSpatial and may be out of date.

Tutorial (9) Accessing GDAL Data provider in DotSpatialÈ

DescriptionExample Data
Tutorial (2) Working with DotSpatial Symbology and Attribute table 
Tutorial (3) Raster data operations in DotSpatialDotSpatialTutorial ~ 3.7z
Tutorial (4) Shape file, Attribute table operations and Printing map in DotSpatial 
Tutorial (5) Projection Explorer in DotSpatial 
Tutorial (7) Label operations 
Testing Data ~ US states shape filestates.zip
Tutorial (8) Create a custom plug-in DotSpatial 
Tutorial (6) Raster Vector Data Analysis in DotSpatial 
Tutorial (1) Working with DotSpatial controls 
 Tutorial (9) Accessing GDAL data provider in DotSpatial 

 

How to get selected Feature FID

Other languages

Jetzt gehts los – Die Anwendungsoberfläche erstellen

http://knowhowdevblog.wordpress.com/2012/05/17/anwendungsoberflache-erstellen/

http://knowhowdevblog.wordpress.com/category/gis-entwicklung/

 

Potential Future Tutorials

2. How to manage gis layers by geoprocessing.
3. How to implement a custom vector provider.
4. How to implement a custom raster provider.
5. How to serialize map or layer information.
6. How to use GPS Data with the GPS DotSpatial classes.
7. How to manage custom vector symbology (classified, unique values, charts, etc.)
8. How to load ECW and MrSID images.
9. How to clip polygons and lines with polygons and lines. 


Note. Put here your request to make one big tutorial page to allow another users learn how to collaborate with DotSpatial.NET project.

New Post: Attribute in Unicode font?

$
0
0
Hi,

Thank you!
This helps me a lot with my brazilian shp files.

Created Unassigned: Export Feature and FeatureLayerActions [25949]

$
0
0
Hi,
I am translating DotSpatial.Symbology.Forms and I made changes in the FeatureLayerActions.cs and the SymbologyFormsMessageStrings.resx

Here my changes to localize the message box output

```
public void ExportData(IFeatureLayer e)
{
using (var frmExport = new ExportFeature())
{
frmExport.Filename = e.DataSet.Filename;
if (ShowDialog(frmExport) != DialogResult.OK) return;

// Create a FeatureSet of features that the client wants exported
FeatureSet fs = null;
switch (frmExport.FeaturesIndex)
{
case 0:
fs = (FeatureSet) e.DataSet;
break;
case 1:
fs = e.Selection.ToFeatureSet();
break;
case 2:
var features = e.DataSet.Select(e.MapFrame.ViewExtents);
fs = new FeatureSet(features) {Projection = e.Projection};
break;
}

if (fs.Features.Count == 0)
{
fs.CopyTableSchema(e.DataSet);
fs.FeatureType = e.DataSet.FeatureType;
}

fs.SaveAs(frmExport.Filename, true);

if (MessageBox.Show(Owner, SymbologyFormsMessageStrings.ExportFeature_Features_Load,
SymbologyFormsMessageStrings.ExportFeature_Features_Exported,
MessageBoxButtons.YesNo) == DialogResult.Yes)
{
LoadFeatureSetAsLayer(e, fs, Path.GetFileNameWithoutExtension(frmExport.Filename));
}
}
}
```
And this 2 strings in the .resx file

ExportFeature_Features_Exported The layer was exported.
ExportFeature_Features_Load Do you want to load the shapefile?

I have a Problem if I need to use a Code page file .cpg thogether with my .shp file.
In this case the .cpg file is not exported too and the data in the exported file are shown with wrong coding.

Any idea how to change the Code to Export the cpg file too?

Updated Wiki: DotSpatial Tutorials

$
0
0

Tutorials

Should I create an extension or an application?

Extension Development

How to Create an Extension

Create an Extension to Import an Excel Worksheet

Create an Extension to Analyze Vector and Raster Data

Using PointSymbolizer on a DrawingLayer

How to Sort Layers Alphabetically

Using MEF Contracts to Coordinate Communication Between Extensions (Advanced)

 

Application Development

Basic DotSpatial Desktop Mapping

How to Support Loading Extensions (Loading GDAL)

How to Add Support for Loading DotSpatial.Plugins.Ribbon

How to Load DotSpatial Extensions Into My Toolbar

Composing an Application by Combining Extensions

Getting started with MEF (Managed Extension Framework)

 

How Do I (End User Documentation)

Finding and Installing the WebMap Extension

Getting Started with Attribute Data Explorer

 

Related Projects

How to Customize Branding of MapWindow 6

 

While the above tutorials use C# code examples, you may use a tool to convert C# to VB.NET.

The following tutorials are developed by Tevaganthan and Daniel Ames, but they were written before the V1 release of DotSpatial and may be out of date.

 

DescriptionExample Data
Tutorial (2) Working with DotSpatial Symbology and Attribute table 
Tutorial (3) Raster data operations in DotSpatialDotSpatialTutorial ~ 3.7z
Tutorial (4) Shape file, Attribute table operations and Printing map in DotSpatial 
Tutorial (5) Projection Explorer in DotSpatial 
Tutorial (7) Label operations 
Testing Data ~ US states shape filestates.zip
Tutorial (8) Create a custom plug-in DotSpatial 
Tutorial (6) Raster Vector Data Analysis in DotSpatial 
Tutorial (1) Working with DotSpatial controls 
 Tutorial (9) Accessing GDAL data provider in DotSpatial 

 

How to get selected Feature FID

Other languages

Jetzt gehts los – Die Anwendungsoberfläche erstellen

http://knowhowdevblog.wordpress.com/2012/05/17/anwendungsoberflache-erstellen/

http://knowhowdevblog.wordpress.com/category/gis-entwicklung/

 

Potential Future Tutorials

2. How to manage gis layers by geoprocessing.
3. How to implement a custom vector provider.
4. How to implement a custom raster provider.
5. How to serialize map or layer information.
6. How to use GPS Data with the GPS DotSpatial classes.
7. How to manage custom vector symbology (classified, unique values, charts, etc.)
8. How to load ECW and MrSID images.
9. How to clip polygons and lines with polygons and lines. 


Note. Put here your request to make one big tutorial page to allow another users learn how to collaborate with DotSpatial.NET project.

New Post: Attribute in Unicode font?

New Post: Attribute in Unicode font?

$
0
0
Hi dear gis4sd agian!
Thanks for answering to me!
I am working with Geoserver 2.6, PostgreSQL 9.2, PostGIS2.1.2 and my Shapefile are in Farsi language.
I already convert my Shpfile to UTF-8 Unicode and my spatial databases are built in same Unicode, also my Geoserver is adjusted to Unicode UTF-8.
But when I download a WFS from Geoserver as a zip file it don't have a ".CPG" file! Just a ".CST" file by ISO-8859-1 Unicode.
And then when I opened this shapefile in ArcCatalog and etc my data are illegible!
I changed this ".CST" to UTF-8 and after created a ".CPG" file with UTF-8 Unicode but nothing is changed!
I attached pictures!
Thanks again!
https://mega.co.nz/#!oFAGASDZ!5AVyWd4guvhfhqZS0GiCXUUlzRZKlCY8RDkdKzB48Ok
https://mega.co.nz/#!0Y5kADqY!wPROaks8eBiv34z9UaVSZli4y81H1_8VDk2CZ8-DnmU
https://mega.co.nz/#!VUwUXZjC!qyoioLxLthErXwxkDoEqYB8kOs9jfLWMvECdrNxQ-sU
https://mega.co.nz/#!9NRhUaIL!Dihr2--6aPdGyVWr17k2vKGsbo9dkQ4dBLPQ03BRwIE
https://mega.co.nz/#!pF5DWCjQ!HsnjC_OA_JaPV-xPb9hx3S8q9CYBUWTfoYfqpgUDMgY

New Post: Attribute in Unicode font?

$
0
0
Hi CodePlex1987,

Could you send me a sample Shape file? It is difficult for me to guess what is your problems with out a file.

happy to help you

New Post: Attribute in Unicode font?

$
0
0
Hi dear!
Yes i sent you two same shapefile; "NumberOne" is my original shapefile and "NumberTwo" is that shapefile that I downloaded from my Geoserver!
Many Thanks dear!
NumberOne
NumberTwo

New Post: Attribute in Unicode font?

$
0
0
Hi,
Could you send me an image of correct font attribute?
Which field is display incorrect, (I don't know which text is incorrect)
Image

In my side, I think just Region_Top field has problem. However, this field displayed is not affected by an encript font .

New Post: Attribute in Unicode font?

New Post: Attribute in Unicode font?

$
0
0
Hi friend,

sorry for my misunderstood.
As I understand now, your source file has no problem with font. The problem happen after you upload the file on to WebGIS and download it back.

In my opinion, strings of the downloaded file is destroyed and we can not correct it. You should find solusion in Geoserver services.

Best regard.

New Post: Attribute in Unicode font?

$
0
0
Hi dear friend.
Thanks for your attention!
If you find it's solve anytime, comment on this discussion for me!
Best regard.
Viewing all 3973 articles
Browse latest View live


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