Create a shapefile using Java Mapscript
dbarron at DSWLLC.COM
Wed Apr 27 15:10:37 EDT 2005
I seem to seeing the exact same issue with writing a shapefile of points
via java mapscript - though at one point it did work.
What's the trick to "closing" the shapfeilObj file in java mapscript? I am
using ms 4.4.0 java mapscript.
At 06:49 AM 4/21/2005, you wrote:
>On Apr 21, 2005, at 6:43 AM, Libo Feng wrote:
>>I am a newbie to Java mapscript and in my project, I need to
>>create a shape file that contains a point. The coordinate of that
>>from an address matching web service. I am able to create the .shp,
>>files with the mapscript and a .dbf file with Javadbf. But the .shp
>>seem to be empty - when I open it with ArcExplorer, there is no point
>>The following is the code:
>>shapefileObj civicAddressShp = new shapefileObj(shapeFile,
>>pointObj addressPoint = new pointObj(x, y, 0.0, Double.MIN_VALUE);
>>Did I miss anything? Thanks!
>Yes, what you missed is that the point isn't written to the file on
>disk until the shapefileObj is "closed". The only way to close it is
>by triggering its destructor. It's awkward, but that's just the way it
>sgillies at frii dot com
More information about the mapserver-users