Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] Import txt, csv or xml

Jesse,

Yes, a CSV format would have the form you describe.

e.g. 1

ID,longitude(GDA94),latitude(GDA94),stat1,stat2,text1,text2
1,150.00000,-33.00000,12.456,-456.345,Sydney,Cooling tower
2,151.00000,-34.00000,193.4,55.62,Wollongong,Weather station

e.g. 2

postcode,total number,percent
2000,110,40.3
2002,320,60.6
2010,114,43.5

With the first example users would want to import the data and create a
shapefile of points using the lat/long values, then display the
locations. With the second example users would want to import the file
then merge the data with an existing shapefile (or other spatial format)
of postcodes, save this as a separate shapefile, then colour shade each
postcode according to the other variables (in this case total number and
percent).

The properties format you describe seems similar to CSV, but without
the need to specify a geometry. The reason I particularly like CSV
format is that other statistical applications like MS Excel, SAS, etc
all export data in this format. If there is a need to put data into a
format like GML it will require extra capability for users which might
be a stumbling block to then go and use uDig.

I am also having trouble trying to import XML or GML files. Here is a
simple GML file that I found on the internet:

<Feature   fid="142" featureType="school" > 
   <Description>Balmoral Middle School</Description>> 
   <Property Name="NumFloors" type="Integer" value="3"/> 
   <Property Name="NumStudents" type="Integer" value="987"/> 
       <Polygon  name="extent" srsName="epsg:27354"> 
            <LineString  name="extent" srsName="epsg:27354"> 
                <CData> 
                  491888.999999459,5458045.99963358
491904.999999458,5458044.99963358 
                  491908.999999462,5458064.99963358
491924.999999461,5458064.99963358 
                  491925.999999462,5458079.99963359
491977.999999466,5458120.9996336 
                  491953.999999466,5458017.99963357 </CData> 
        </LineString> 
    </Polygon> 
</Feature>

When using the Import Wizard I select the above file and then the
"Import from Data Sources" window specifies "Files. Open one or more
files" but doesn't list anything to select, the "Next" button is greyed
out and if I click on the "Finish" button there is a quick message above
the "Finish" button saying "Validating connections", but nothing
actually happens.

Thanks and regards,
Alan

Could you give me a few more details about the CSV format?  Would it
be

10,10,attribute1value,attribute2value
20,10,attribute1value2,attribute2value2


something like that?

Would the properties based format work for you? It more or less looks 

like:

_=geom:Polygon,id:Integer,name:String
fid1=10,30,40,50,10,30|id1|firstFeature
fid2=0,0,40,50,0,0|id2|secondFeature

Jesse

On Mar 27, 2007, at 5:53 PM, Alan WILLMORE wrote:

>
> Hi Jesse,
>
> Thanks for the reply.
>
> I am evaluating and considering the utility of a number of free  
> desktop
> GIS software tools for deployment within the NSW Department of  
> Health. I
> consider the ability to import textual data containing geographic
> variables (e.g. lat/long, postcode, etc) as a critical component of 

> the
> selected software. Users will want to import geocoded address data,
as
> well as aggregated statistics with geographic identifiers (e.g.
> postcode) that can then be merged with the spatial datasets to
create
> thematic maps. Most NSW Health staff are able to output data in CSV
> format and would be immediately able to work with this format in a  
> GIS.
> Requiring users to create GML formatted data would just not work  
> within
> our department.
>
> Can you advise if this development is likely to occur, and if "yes",
> the timeframe for such development ?
>
> I sincerely hope that such development is in the short-term
framework
> as I am impressed with uDig and would like to recommend it's use
> internally.
>
> Regards,
> Alan
>
>
>
> Hi currently we only support GML and other standard formats for
> importing data.  But we don't have that functionality...  We really
> should and it would be stupidly simple to do so.  Especially since
> there is a format in geotools that can do this almost directly.  The
> job for this is at most a couple days of work... Probably less.
>
> Jesse
>


Disclaimer: This message is intended for the addressee named and may
contain confidential information. If you are not the intended
recipient, please delete it and notify the sender. Views
expressed in this message are those of the individual sender,
and are not necessarily the views of NSW Health.

______________________________________________________________________
This email has been scanned for the NSW Department of Health by the MessageLabs Email Security System. The Department regularly monitors emails and attachments to ensure compliance with its Electronic Messaging Policy.
_____________________________________________________________________


Back to the top