Great to hear that you found the cause of the problem. Thanks very
much for posting it to the list - it's good to have ones like this in
the archives.
Michael
On 12 October 2011 03:34, filippov70 wrote:
> I solved the problem.
> were too long strings in russian language are to record in the DBF
I solved the problem.
were too long strings in russian language are to record in the DBF
Caused by: java.lang.StringIndexOutOfBoundsException: String index out of
range: 253
at java.lang.StringBuffer.charAt(StringBuffer.java:179)
at
org.geoto
Thank you very much, your assistance conditional has been very helpful to me.
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/writing-shapefile-problem-tp6846785p6879547.html
Sent from the geotools-gt2-users mailing list archive at Nabble.com.
---
No idea - sorry. I haven't experienced this error in my own work and
don't recall it being reported previously.
Since neither Jody or I have been able to help you so far all I can
suggest is for you to track the writing of a feature to shapefile with
your debugger and see if you can isolate the p
Thank you for the visualization of my data.
But I did not add such polygons in SimpleFeatureCollection:
mp = new MultiPolygon (pa, geometryFactory);
if (mp.isValid ()) {
parcelBuilder.add ("Polygon");
parc
Hello,
That polygon has a self-intersecting outer shell. This image shows the
lower (southern) end of the polygon. There is a vertex way off to the
north-west that is causing the problem...
http://imagebin.org/178408
Michael
On 10 October 2011 20:56, filippov70 wrote:
> Yes, some multipolygon
Yes, some multipolygons not valid.
Here they are:
MULTIPOLYGON (((2283017.17 519163.53, 2283148.29 519197.73, 2283148.29
519197.73, 2283201.92 519264.53, 2283201.92 519264.53, 2283248.03 519284.69,
2283248.03 519284.69, 228.15 519306.07, 228.15 519306.07, 2283375.37
519329.65, 2283375.37 51
Perhaps you could post the WKT representation of one of the Polygons
that you think is causing the problem. Then I, or others here, might
be able to spot what is going on.
If you are not certain which are the problem polygons you could also
try calling the isValid() method on each of them.
Michae
Obviously, now I'm using polygon to determine the area.
But the problem is not solved, all the same error. Occurs when a written
shapefile that contains the polygon which contains a hole.
Current fid index is null, next must be called before write()
Откат изменений в shapefile, но файл создан.
St
Hello,
A LinearRing will always have an area of 0 because it is linear, not
polygonal. Having the start and end coordinates the same gives you a
closed ring but unless you create a Polygon or MultiPolygon with it
you still just have a line.
Michael
On 10 October 2011 17:39, filippov70 wrote:
>
Hi!
I understand the problem.
In the source file "holes" in the polygon, as well as the shell is not in
order, for example, the coordinates of the shell did not go to the beginning
of the description of the landfill.
I decided to determine the maximum area among all of the Rings:
double maxArea =
I will try to recreate this bug, test files > 500 pieces!
Previously, this problem was for me, as I mistakenly assigned CRS (/ /
newDataStore.forceSchemaCRS (CRS.decode ("EPSG: 28 415 "));) in
ShapefileDataStore.
Thank you for indication of errors in syntax, of course, is a local
variable.
Thank
So yeah it comes back to your actual data; I think some of it may be causing
trouble? Put a break point in the commit() method and see if you can look at
the feature that is causing the trouble?
Aside: SimpleFeatureSource ParcelfeatureSource =
polygonDataStore.getFeatureSource (ParcelTypeName
Interestingly, I have not changed anything, has launched a project as usual
and works!
While tested on three original XML-files...
--
View this message in context:
http://osgeo-org.1803224.n2.nabble.com/writing-shapefile-problem-tp6846785p6853952.html
Sent from the geotools-gt2-users mailing
Thank you very much for taking part in the solution to my problem!
I take the data on the coordinates of the XML-file.
In SAX parser, I create the geometry and the objects themselves:
parcelBuilder.add ("Polygon");
parcelBuilder.add (mp); / / MultiPolygon
parcelBuilder.add (cadastreNumber);
Simpl
Jody, I think Vladislav is just starting out with GeoTools, plus he
told us that English is not his language, so your reply might seem a
bit mysterious :)
Vladislav, can you post your code to the list please or if it is very
large post it to Jody or myself privately.
Michael
On 3 October 2011 1
Well that is looking more like a bug; since it is happening inside the
"commit" and not inside code you control.
Is there any chance that the "fid" (or FeatureId) is null (in the feature
collection you are writing out?)
The code looks like the following:
/**
* Writes the current fidIndex. Wr
ОК,
java.io.IOException: Current fid index is null, next must be called before
write()
at
org.geotools.data.shapefile.indexed.IndexedFidWriter.write(IndexedFidWriter.java:251)
at
org.geotools.data.shapefile.indexed.IndexedShapefileFeatureWriter.write(IndexedShapefileFeatureWriter.
Not sure; can you provide a stack trace?
In general we need:
1) to call "next()" to get a feature which we can fill with the new values.
2) to call "write()" to write those values out to disk
I would recommend using a transaction for this kind of work; so when you call
"commit" it can write th
Hi Vladislav,
I have just checked the csv2shp tutorial application and it is working
ok. Please post the complete error trace to the list so we can check
it out.
Michael
On 30 September 2011 17:25, filippov70 wrote:
> Hi everyone!
>
> I have tried to solve my problem as in the example -
> http
Hi everyone!
I have tried to solve my problem as in the example -
http://docs.geotools.org/latest/userguide/tutorial/feature/csv2shp.html
http://docs.geotools.org/latest/userguide/tutorial/feature/csv2shp.html .
When writing data to a file error occurs: java.io.IOException: Current fid
index is
21 matches
Mail list logo