Re: [OpenMap Users] How to create shape file from CSV

From: Raghu <raghav_kune_at_yahoo.com>
Date: Mon, 15 Dec 2008 22:57:18 -0800 (PST)

Hi Don,
 Thx for the reply . My requirement is something like this.

I have a file( i am calling it as CSV of my own format) with multiple entries , the sample format is given below

 Description , Latitude1,Longitude1,Latitude2,Longitude2,Latitude3,Longitude3,Latitude4,Longitude4.


The sample data is as follows
xxx,20,30,20,31,21,31,21,30.
yyy,22,40,22,41,22,42,22,40.


i would like to create the polygon by joining the latitude4 , longitude4 with latitude1 and longitude1.

Now the requirement is i would like to convert all the entries present in this CSV to Shape file that will give me multiple polygons in a single shape file.

Your help is greatly needed.

 Note :
 My activities towards your reply were carried out as below :

I tried adding to OMGraphicList by reading the coordinates int a vector and adding to OMPoly , later OMPoly to OmGraphicList . At last exporting this to EsriShape file by EsriShapeExport . The file got created but the problem here is when i open the file from other applications like RSI ENVI or other shape file display applications , the message is coming to "Invalid Shape file Format" . But when the same file is opened on the openmap the shape layer is displayed But none of the opertations like (zooming / out , Navigation ) not happening.
 Can you please look into if any problem in the EsriShapeExport Utility ( i just guess) or else should i do any settings from OMPoly before i export to Esri.

Pl help him out in this regard. Help is greatly appreciated.

-Raghav , DOS






--- On Mon, 12/15/08, Don Dietrick <dietrick_at_bbn.com> wrote:

> From: Don Dietrick <dietrick_at_bbn.com>
> Subject: Re: [OpenMap Users] How to create shape file from CSV
> To: raghav_kune_at_yahoo.com
> Cc: openmap-users_at_bbn.com
> Date: Monday, December 15, 2008, 10:02 PM
> Which CSV file are you converting? To convert a CSV file to
> a Shape file you need to know what the parameters are in the
> Shape file.
>
> You can use the CSVFile object to read in the CSV file into
> a Vector of Vectors, representing the rows and columns.
> Then, you can create OMGraphics from that information (this
> is the bit that requires that you know what the fields are
> in the CSV file). Then, you pass the OMGraphics to the
> EsriShapeExport class to create a Shape file from the
> OMGraphics.
>
> Hope this helps,
>
> Don
>
>
> On Dec 15, 2008, at 1:34 AM, Raghu wrote:
>
> >
> > hello,
> > Anybody worked out on converting the CSV to Shape
> file(esri) . Pl let me know.
> > help is greatly appreciated.
> >
> > -Raghav , DOS.
> >
> >
> >
> >
> > --
> > [To unsubscribe to this list send an email to
> "majdart_at_bbn.com"
> > with the following text in the BODY of the message
> "unsubscribe openmap-users"]
>
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Don Dietrick, dietrick_at_bbn.com
> BBN Technologies, Cambridge MA
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=


      

--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Dec 16 2008 - 02:00:21 EST

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT