[Mapserver-users] create and display point obj on the fly
Hankley, Chip
Chip.Hankley at GASAI.Com
Thu Feb 6 06:37:38 PST 2003
Typically I've used this technique when creating new shapes in a shapefile.
The process would go something like this:
create a ShapefileObject (create new or open existing)
|
V
create / open dBase file
|
V
create a ShapeObject
|
V
add the ShapeObject to the ShapefileObject
|
V
add attribute record to dBase object
This keeps the order straight. As I understand shapefiles, the 'order' of
features is the order in which they were created. This will be the same for
a dbase file (as long as it doesn't get resorted by someone opening it in a
spreadsheet or the like and sorting it!).
Thus, as long as you add a dbase record for each shape that you add, you
should be fine.
Hope that helps.
Chip
> -----Original Message-----
> From: Lionel Bargeot [mailto:l.bargeot at educagri.fr]
> Sent: Tuesday, February 04, 2003 8:37 AM
> To: Hankley, Chip
> Cc: mapserver-users at lists.gis.umn.edu
> Subject: RE: [Mapserver-users] create and display point obj on the fly
>
>
> Le mer 05/02/2003 à 22:23, Hankley, Chip a écrit :
> > In PHP-MapScript, I create the Dbase file using the xBase
> functions that
> > are
> > part of PHP.
> >
> > http://www.php.net/manual/en/ref.dbase.php
> >
> > In particular, check out dbase_create:
> >
> > http://www.php.net/manual/en/function.dbase-create.php
>
> hi,
> thanks for this suggestion, i will have test on it today. But
> could you
> tell me if it's easy to populate a dbase file to abtain a valid (.shp,
> .shx, .dbf) group of file.
> I don't know anything about keeping link between the geography data
> (.shp, .shx) and semantic data (.dbf). Is it a simple
> question of order
> in the dbf file. Will the order in the dbf correspond to
> shapes index ?
>
> If you have any experience on this subject, let me know
> thanks
> Lionel
> --
> AgrogeomaTIC
> CNERTA-ENESAD, 4 rue champs-prevois, batiment grand-champs,
> 21000 Dijon
> 03.80.77.28.49
> http://stb.educagri.fr
>
More information about the MapServer-users
mailing list