Hot answers tagged

3

No offense, but, actually, the conclusions of your co-worker about how something he thinks should work doesn't make it the "official way" it should work. For that, we refer to the OGC specifications. You can download the OpenGIS Simple Features Specification for SQL 1.1 from the OGC website (a bit older) or even better, the newer OpenGIS Implementation ...


2

How about PolygonBuilder in nettopologysuite NetTopologySuite is a C#/.NET port of JTS Topology Suite, a Java library for GIS operations, (OpenGIS compliant).


2

First, you need to use BruTile 0.7.4 for the Bing maps to work correctly (there was a bug in the 0.7.3). 0.7.4 is newly released on NuGet The you can do like this.. SharpMap.Layers.VectorLayer vLay = new SharpMap.Layers.VectorLayer("Name of layer", provider); ICoordinateTransformationFactory ctFact = new ...


2

I looked at SharpMap and it suggests you need a 3rd party to view MapInfo files. if you want to use MapInfo tab format files, you need an OgrProvider. For SharpMap v0.9 it is in the SharpMap.Extensions project. For SharpMap v2.0 there is one in the branches/initialgdalintegration branch. If you get this extension, you'll be able to view MapInfo files; ...


2

Basically my co-worker answered my main questions, so I'm punching them in here for the sake of answering the thread. Hopefully a few people will up-vote it, giving it some added credibility. Q1: Is the ESRI Line Geometry as WKB really invalid? [Yes.] The wkb says there is 9 points in the line, and then the parser should read 9 points. MS (rightfully) ...


2

I have worked on my PhD project in the field of Intelligent Transport System, which has similar development requirements as you mentioned in this post. In that project I have done a C# based software prototype to demonstrate the integration of GPS, GIS,wireless communication, and other algorithms. Primarily I have adopted Dotspatial components to develop ...


2

I am currently using SharpMap for Winforms Desktop App written in C#. I use sharpmap to display ESRI shape files. The sample application is pretty good. Not sure how accurate distance calculations in SharpMap are but seems fine. Probably depends on your GIS base files. A fair assessment is that the documentation is fair to poor. But its written in C# ...


2

I found that manually conforming my WKT to the BNF described here eliminates the errors. Content repeated below: <coordinate system> = <projected cs> | <geographic cs> | <geocentric cs> <projected cs> = PROJCS["<name>", <geographic cs>, <projection>, {<parameter>,}* <linear unit>] ...


2

The most likely reason why they appear in the same place is that you are looking at two points of ~14 metres differences, at a scale where they aren't distinct. The coordinate lengths are in the spatial reference system (e.g. in Google Mercator based on your question) you are using - you need to do a transformation to convert between spatial reference ...


2

You need to setup another map and handle MapCenterChanged and MapZoomChanged events.


2

The geometry and attributes should be linked. If you already have the FeatureDataRow object then try getting attribute values with row["ATTRIBUTE_NAME"] If you can't actually get a FeatureDataRow object have a look at the How do I return a set of feature attribute data from a click on a map? page, but you will need to use SharpMap.Data.Providers.ShapeFile ...


2

You would first need to tweak the SpatiaLite provider by either add a OrderBy property and apply that to the relevant queries (GetGeometriesInView, ...), or update the provider to handle spatial views correctly. Then you need to apply a custom theme setting assigning the appropriate color in respect to ZOrder. Why don't you want several layers? Hth ...


1

try this: var provider = vectorLayer.DataSource; var geometry = p.GetGeometryByID(fid); var location = geometry.Centroid.Coordinate; //map.Center = location; mapBox1.Map.Center = location; mapBox1.Refresh();


1

You can have a closer look at the OSM wiki about Tiles. But when you plan to do some bulk downloading of OSM based tiles, please pay attention to each Tile usage policy. Finally you can search the OSM wiki about "brutile" ... no direct article so far, but maybe some hints.


1

My first thought was that you were hitting a drawback of the shapefile format rather than SharpMap but Easy GIS .NET claims to be able to do better than SharpMap with the same format: The library has been designed to handle very large shapefiles, without compromising performance or memory usage. For example the library is capable of opening ...


1

This -probably- is pretty easy to fix. One or more of your polygons must have self-intersecting rings. This can usually be fixed performing a buffer operation on the dataset with a buffer distance of 0. Hth FObermaier


1

It looks like you're using DotSpatial. Here's a similar question and answer: Coordinate transformation/reprojection using DotSpatial This looks like the documentation for the library: http://www.mapwindow.org/downloads/documentation/dotspatial-1.0/html/66de9da3-2eda-7ca5-9ee5-e9b8a76f8392.htm


1

You will need the coordinates of your center point in Google Map coordinates, and maybe a different resolution that will fit the area of your interest. You can get the coordinates by using a GIS software like QGIS, or play around with the given values and see how the map moves towards your target. From the first choice, you may land at coordinates about ...


1

BruTile has a lot of breaking changes from v0.7.4 to v0.12 You will have to adjust SharpMap's TileLayer to reflect these.


1

A common approach is to re-project either your coordinates or datasets so that they are in the a common UTM zone. That way there is no need to know when you have crossed bounds. Then you can measure points. Alternatively, it is possible to calculate a zone based on coordinates. You can do this with PROJ.4 or you can find a C# algorithm or lib for UTM if you ...


1

this may help you..Its a getting start with sharp map: Creating an Interactive Map in ASP.NET 2.0 Using SharpMap


1

It's not clear from your question whether you know the proj4 string for the projection you want to convert into. DotSpatial has some built-in projections under DotSpatial.Projections.KnownCoordinateSystems, but I can't locate Lambert. If you just want to know how to use DotSpatial, you can use code like this, passing in the proj4 strings (sorry it's in C#, ...


1

You would have to create a custom provider for your business object. Implementing the SharpMap.Data.Providers.IProvider interface is not that hard. Basically you have to provide the means to setup a SharpMap.Data.FeatureDataTable object that resembles your business object. in your case it needs an identifier (uint) and your risk value (double?). Have a ...


1

SharpMap.Layers.VectorLayer vlay = new SharpMap.Layers.VectorLayer("States"); //vlay.DataSource = new SharpMap.Data.Providers.ShapeFile("d:\\+PMF\\GIS\\states_ugl.shp", true); SharpMap.Data.Providers.SqlServer2008 d = new SharpMap.Data.Providers.SqlServer2008(connectionString, ...


1

You need to specify an object id column! If you don't have one on your table, you need to add one (UINT). You need to check your connection string. Is your SQL-Server instance really "YOUSSEF-PC\SQL"? You can test if your connection works by invoking System.Diagonstics.Debug.Assert(vly.GetFeatureCount() > 0); Do you have geometry of geography objects ...


1

You can do something like this: //Proivder for labels only fetching one river SharpMap.Data.Providers.ShapeFile shapeFileProviderLabels = new SharpMap.Data.Providers.ShapeFile(@"rivers.shp", false); shapeFileProviderLabels.FilterDelegate += new SharpMap.Data.Providers.FilterProvider.FilterMethod(delegate(FeatureDataRow row) { return row["NAME"] ...


1

turned out it was easier to load the data into SpatialLite, transform to 3857 and then transfer to SQL Server 2012.


1

Sounds like you need to compile SharpMap, then add the proper references to your .NET project. From the docs: In desktop applications add a reference to SharpMap.dll. For ASP.NET web-applications place SharpMap.dll in the /bin/ folder. Depending on the providers you intend to use, you may need to add a reference to SharpMap.Extensions.dll. If you ...


1

Can't you simply use point in polygon search? Something like SELECT dbo.Point_In_Polygon etc, etc. I'd simply load the coordinates of the polygon to one table and then perform a PiP on that table, using your coordinates. Unless I have missed a point? Here's http://www.vb-helper.com/howto_net_point_in_polygon.html a page which shows VB.NET code to do the ...


1

Does this question help?



Only top voted, non community-wiki answers of a minimum length are eligible