[mapserver-dev] Alternate of dbf file
Jeff McKenna
jmckenna at gatewaygeomatics.com
Thu Aug 18 07:11:07 PDT 2016
Hello Pushpendra,
I would save the spreadsheet as a .csv file and setup a .vrt file to
access the spatial columns (see driver page for examples
http://www.gdal.org/drv_csv.html). Here is a recent one that I used:
<OGRVRTDataSource>
<OGRVRTLayer name="occurrence">
<SrcDataSource relativeToVRT="1">CSV:occurrence.txt</SrcDataSource>
<GeometryType>wkbPoint</GeometryType>
<LayerSRS>WGS84</LayerSRS>
<GeometryField encoding="PointFromColumns" x="decimalLongitude"
y="decimalLatitude"/>
</OGRVRTLayer>
</OGRVRTDataSource>
When you have a .vrt setup, test that through an ogrinfo command; once
you are sure that OGR can read the spatial information (through
ogrinfo), then move to your mapfile. Configure your mapfile layer for
an OGR connection such as:
CONNECTION "test.vrt"
CONNECTIONTYPE OGR
-jeff
--
Jeff McKenna
MapServer Consulting and Training Services
http://www.gatewaygeomatics.com/
On 2016-08-18 4:00 AM, Pushpendra Singh wrote:
> Hi All,
> Greetings of the day....
>
> Currently, I am working with Mapserver 6.2 using csharp
> mapscript (using c#). As we know that when we create shape files from
> excel then as a result we get .shp, .dbf etc files.
>
> My problem is that our .dbf file is many times larger than the excel
> file we used to generate the .dbf file. Many a times it will result in
> "SystemOutofMemory" exception as we have large number of records in our
> excel file (say in between 5-10 Lacs records). Basically these excel
> files contains the drive test records.
>
> Is there any workout to overcome from *SystemOutofMemory Exception. *To
> create a dbf file I am using the method of *shapelib.dll.*
>
> Apart from that, I want to know that is it possible that we can use
> excel file instead of .dbf file as it is easier to work with excel in
> comparison to .dbf files?
>
> Any guidance in this direction will be highly appreciated.
>
> Thanks.
>
> --
> With Regards
> --------------------------
> Pushpendra Singh
> Software Developer
More information about the mapserver-dev
mailing list