Simple SharpMap example to create shape file - c#

I'm looking to create a simple shape file using sharpmap (or some other library if it's easy/free). I want a shape file with just some lat/long points on it. I can't find a simple working example using sharmap v2 that actually can compile.
I don't want to put these shape files in to a map engine at run time, just save the files off to the disk.
The closest thing I could find is here, but targets an older version of the API:
http://sharpmap.codeplex.com/discussions/38358

The SharpMap project is apparently spitted into two main branches on GitHub:
One is called SharpMap and is pretty active: https://github.com/SharpMap/SharpMap
The other one is SharpMapV2 and was apparently dead by around 2012 https://github.com/SharpMap/SharpMapV2/
They are both under the same GitHub account so the "branding" of these libraries and their API is pretty confusing.
The SharpMapV2 has some saving capabilities. The Link you provided uses the API of SharpMapV2.
The two project have common developers, maybe the easiest way to know about the status of that feature in both version is to try to get in touch with them and post their answer here.

Related

How to create basic IFC File in C#

As per Wiki, The Industry Foundation Classes (IFC) data model is intended to describe architectural, building and construction industry data.
The Industry Foundation Classes (IFC) data model is a neutral and open specification that is not controlled by a single vendor or group of vendors. It is an object oriented file format with a data model developed by buildingSMART (International Alliance for Interoperability, IAI) to facilitate interoperability in the building industry, and is a commonly used format for Building Information Modeling (BIM).
For example One could be developing virtual building model in Revit, then send it to interior team who use ArchiCAD. It might also be sent to engineers who use Tekla. Before the IFC standard file type this would have been a nightmare. As Revit, ArchiCAD, Tekla can talk to each other, but not easily!!!
IFC aims to solve this problem, so that it won't matter so much. IFC file is unified format which can be understood by other CAD Softwares as well.
My Organisation works on one of the CAD Software and they want to export there Models in IFC so that it can be open and viewed in Other software's as well like Revit, ArchiCAD, Tekla.
So Our use case is, we need to create a IFC file of such a model.
So as per this Post, I am planning to use xBim. This link
I am using xBim Library to Create IFC File in C#. As per xBim documentation and Sample Code, I found that, How to create a Simple wall.
Now I want to create a basic Xbim.Ifc4.HvacDomain.IfcPump.
Can someone help me how to create one Xbim.Ifc4.HvacDomain.IfcPump in IFC using xBim C#?
I am new in CAD development and hence I am finding difficulties to understand the IFC. Please do the needful.
I hope this much information will be helpful,enough and clear.
Thanks in advance!!!
Without an example of code of what have you tried is difficult to help, but you can find resources in the API of XBim. With the examples of how to setup a wall in the document and the API documentation you should have clues to how to start your program, once you have some code, you can clarify the question so the community can help you more efficiently.
About how the IFC works and is written, you can find all you need to know here if you use a different version check the this website, in the IFC documentation the pump you are looking for is here.
I hope this resources are useful for you task.

Automatically convert a MindMap to another app (e.g. MS Project)

Here is the situation:
We ran a brainstorming session to find all the tasks we will have to achieve for our project
Now, I want to create a Gantt Planning (for instance) with all these tasks
We already built a MindMap with Xmind (I sometimes use Freemind too, or I could also export the Xmind to a Freemind format).
I would like to create a Gantt Planning in Microsoft Project (this is what we mainly use here).
My questions are:
Has anyone of you ever tried to automate the creation of a Gantt from the MindMap (using each level of the MindMap as Title and each leaf as Tasks)?
Would it be possible with VBA? Or C#? I didn't find much API to Xmind of Freemind, did I miss something?
If you can convert your mind map to Freemind, there is some documentation on the Freemind site which provides a couple of approaches to reformatting the Freemind file as an XML file which MS Project can read.
I maintain MPXJ, a library which can be used to read and write file formats which MS Project works with. I felt sure that someone had already written an add-on for Freemind which allowed you to export mind maps as a project plan using MPXJ... however I can't find a reference to it any more! If you don't mind a bit of coding (in Java, or any of the .Net languages) it wouldn't be too hard to achieve what you want using MPXJ.
Jon
We're doing exactly that with STOIC.

Monotouch - select multiple photos

Is there a way to do this in MonoTouch?
http://definelabs.com/blogs/?p=17
I don't understand much of that Objective-C code...
I wrote an article on this: Accessing iPhone Album
I know this is an old post, but there is a demo app that I've created that lets you do the features Nicklas Savonen requested.
What this demo app does is, it will get the list of images from AssetLibrary and will load them in a UItableview, then maintain a selection status, the Tick image is just an overlay image that will be hidden/visible based on selection.
The following link explains the basic steps you need to take, since it would be difficult to understand by the project:
http://helpalittle.wordpress.com/2014/03/28/monotouch-multiple-image-picker/
And you can find the complete solution at the following path: https://onedrive.live.com/redir?resid=697F540B0A2F1506%21107
hope this helps.
I know am not helping much at this point, but you need to learn at least a bit of ObjectiveC to be able to read it. The issues is, that all the samples and plenty of resources for iOS development is in ObjC and converting it to Monotouch is not that complex, in fact all the constructs there have C# equivalent (the blocks in the sample you posted, are in fact anonymous methods).
More to the point, multiselection of the images is done in the iOS SDK 4.x, if I find some spare time this would be a nice little exercise for my blog.
As to what APIs to check for this, these are asset library APIs:
ALAssetsLibrary & ALAsset & ALAssetsGroup
in Monotouch there are classes in (pseudo code):
using MonoTouch.AssetsLibrary;
MonoTouch.AssetsLibrary.ALAsset;
MonoTouch.AssetsLibrary.ALAssetsLibrary;
MonoTouch.AssetsLibrary.ALAssetsGroup;

zxing in C# using IKVM

I converted the jar file into .net dll file using IKVM. Now i am trying to consume it in my .net app, but it seems that the qrcodereader.decode requires BinaryBitmap which further requires Luminance as parameter. Please guide me in this situation since i couldn't find the right classes that implements the abstract classes.
Luminance sources are platform specific. You can find examples in the android, java2se, and iphone directories. I don't know if there are any luminance sources in the csharp directory but that code is not actively maintained so even if there is, it'll likely take cleanup adaptation (not to mention I have no idea if it's compatible with IKVM).

What is a good api for mapping gps coordinates in c#?

I have a project that has a list of gps coordinates. I would like to find a way to make a simple map of those coordinates (possibly just one at a time). The map should have basic street info.
This part of our project is pretty simple so I don't think it needs to be an exceptionally feature rich product. This also means it shouldn't be really expensive.
What is a good product to achieve this?
edit: This is a desktop app where internet connectivity will probably not be available.
Google Maps is great for this.
If this is a desktop app with internet access you could still host an IE control and show it there.
EDIT: If this is a desktop app without internet access you'll have to buy something like Microsoft Streets & Trips. I don't know if it has reusable controls. You probably have to buy something more expensive to get that. Applications of this nature often fall under the category "GIS". Try searching Google for that.
Sharpmap is open source project written in C# and released under LGPL. To quote first line from page:
SharpMap is an easy-to-use mapping library for use in web and desktop applications.
I'd go with this solution
Map Rendering: SharpMap
Geometry operations: NetTopologySuite
Map data store: shapefiles in your file system or PostGis over PostgreSQL
Map data itself: the easiest way may be extracting from OpenStreetMaps data. Here, for example you can download shapefiles for your desired location
Everyting is open source (more or less, check the licenses) and works fine on windows.
Hope it helps
ESRI has an API. They have javascript, silverlight,wpf, and flash. they may have more. ESRI is pretty much the standard in mapping.

Categories