From: Andrea A. <and...@ge...> - 2013-05-02 09:40:20
|
On Thu, May 2, 2013 at 9:58 AM, Moises Arcos <ma...@em...> wrote: > Hi all, > > I have a question related with the FeatureID from a SimpleFeature. > > I'm trying to access to a id from a feature with the getID() method from a > SimpleFeature, and the result is a String with: > > "*tablename.id*" > > I don't need that, I need only the id number and I don't know how to get > it. > The ID generation code does not have flags, so you cannot modify it unless you go into the datastore code and change it directly. Mind, some stores, like the JDBC ones, have an option to expose the FID attributes also as normal attributes, see the connection parameters > I have been trying to separate that string by the point but it's not > possible, that split return [] (empty array). > Ah, that's likely because you did not escape it. Try split("\\.") Cheers Andrea -- == GeoServer training in Milan, 6th & 7th June 2013! Visit http://geoserver.geo-solutions.it for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via Poggio alle Viti 1187 55054 Massarosa (LU) Italy phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- |